Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 2
Message 11 of 18

Re: GitHub Pages doesn't use updated CSS file

No, that is not the solution.

The problem is that the content on gitHub from which the site is built, is not reflected in what github.io serves.

There is an unpredicatble delay which can be seconds or hours.

Moderator
Message 12 of 18

Re: GitHub Pages doesn't use updated CSS file

Hi everyone!

 

If clearing your cache/removing cookies doesn't work as explained by @yangciou, I would recommend reaching out to private support with the name and link of the repository you are working with. They should be able to take a closer look.

 

Cheers!

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Ground Controller Lvl 1
Message 13 of 18

Re: GitHub Pages doesn't use updated CSS file

It happened to me too. What i understand is you need to clear the cache of your browser. I try on other browser it is working fine. Please clear cache and try hope it works....

Ground Controller Lvl 1
Message 14 of 18

Re: GitHub Pages doesn't use updated CSS file

Was having the same issue and Ctrl + f5 did the trick for me (refreshes your cache)

Ground Controller Lvl 1
Message 15 of 18

Re: GitHub Pages doesn't use updated CSS file

I have same problem too. I created my own beta website at 'betaleapofazzamgithubio' repository. But the website only can loads CSS from third party CDN website (like CDNjs).
Ground Controller Lvl 2
Message 16 of 18

Re: GitHub Pages doesn't use updated CSS file

As the CSS files could also be cached locally, it would be nice if support for https://github.com/tkareine/jekyll-minibundle is added to GitHub pages. minibundle adds a hash of the contents to the filename, so that a different filename is used when changes are made, avoiding the cache altogether for updated files.

Ground Controller Lvl 1
Message 17 of 18

Re: GitHub Pages doesn't use updated CSS file

If you have / before you css file remove it.

Example 

<link rel="stylesheet" href="/main.css" />

won't work but

 

<link rel="stylesheet" href="main.css" />

 

will work

Copilot Lvl 3
Message 18 of 18

Re: GitHub Pages doesn't use updated CSS file


@dexterAndre wrote:

I'm using GitHub Pages for my website at this specific site: https://putlockers.llc/. The problem is that whenever I push new files on GitHub, the CSS files do not update on the site. It just uses an older version. I tried making changes to the HTML file, and that works perfectly, but the CSS file still stays behind and loads an old version. It has been about 1 hour since I pushed the last changes, and it still doesn't load the new CSS file. 

 

Just to be clear: the CSS file is updated on GitHub, but the actual website does not use the updated file. The CSS file can be found here: https://github.com/dexterAndre/LudoMath/tree/gh-pages/Common 

 

This problem seems to have many causes and fixes, but none have worked for me, so that's why I'm asking here. I'm pretty new to web development, so please excuse me if I'm missing something obvious. 


 

When I first started using GitHub pages, I also had the same experience. It is not GitHub’s fault, instead it is your browser. The solution to this is by going to your browser settings and reset cache and cookies. This should work. Another way of doing this is by using Git. You make your changes on your local desktop, and see what the website looks like by opening index.html . Then you can git push it to github and be rest assured that it will be like what you saw in your local desktop.