Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 11

GitHub Pages doesn't use updated CSS file

I'm using GitHub Pages for my website at this specific site: https://ludomath.net/LA/vectors.html. 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. 

10 Replies
Copilot Lvl 3
Message 2 of 11

Re: GitHub Pages doesn't use updated CSS file

So I've waited for about 3 hours, and finally the changed were made. I worked with some other files in the meantime, but I don't know if that was the solution. The problem that the HTML file does update quickly, while the CSS file doesn't update before 3 hours still persists, and I'm still interested in hearing how I can improve the CSS update speed for GitHub pages. 

Pilot Lvl 1
Message 3 of 11

Re: GitHub Pages doesn't use updated CSS file

Hi,

 

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.

Copilot Lvl 3
Message 4 of 11

Re: GitHub Pages doesn't use updated CSS file

I have tried deleting the cookies and resetting the cache in Chrome, but it doesn't help. Also, I'm using both GitHub for Desktop and also directly modifying the file on the GitHub website itself, but none of these work, unfortunately. 

Ground Controller Lvl 1
Message 5 of 11

Re: GitHub Pages doesn't use updated CSS file

Even I faced the same.
I think its due to caching in their servers. For me, it took between 15-40 minutes.

GitHub pages should provide some way to avoid it.

Ground Controller Lvl 1
Message 6 of 11

Re: GitHub Pages doesn't use updated CSS file

About 4 hours and no updates happening. The files updated immediately in the repo, but not on the hosted page.

 

Finally the page updated....

Ground Controller Lvl 1
Message 7 of 11

Re: GitHub Pages doesn't use updated CSS file

I am experiencing the same problem.

When I use git to upload, the changes are only noticeable in incognito mode. But when I upload directly to github, the changes are noticeable after about 5 minutes.

Ground Controller Lvl 1
Message 8 of 11

Re: GitHub Pages doesn't use updated CSS file

same problem too yesterdy it takes 12 hour to updat the steelshet 

Ground Controller Lvl 2
Message 9 of 11

Re: GitHub Pages doesn't use updated CSS file

Same problem for me too.

GitHub pages are not reflecting changes on the github repository. 

Ground Controller Lvl 1
Message 10 of 11

Re: GitHub Pages doesn't use updated CSS file

Just clear the browsing data in the browser settings and it will work.