How long does it take for GitHub page to show changes after changing index.html

GithubUpdatesGithub Pages

Github Problem Overview


I am just wondering how long does it take for GitHub page to show the new items that I have added to the repository.

I changed index.html but after 10 minutes it still showed up the previous page...

Github Solutions


Solution 1 - Github

The first time you generate your site it will take about 10 minutes for it to show up. Subsequent builds take only seconds from the time you push the changes to your GitHub repository.

However, depending on how your have your domain configured, there may be extra time for the CDN cache to break.

Note: using a subdomain, such as yourproject.github.io is the recommended domain setup, but does mean page builds take longer to show up since it has the benefit of using the GitHub CDN.

Solution 2 - Github

Github pages are cached with CDN. As explained by JoelGlovier in comments, you can still have the latest version of your pages by appending a version in the query string such as https://username.github.io/awesome-repo/?version=f36af92 so that you won't get a cached version of your page.

Solution 3 - Github

Github also has a deployment page: https://github.com/<user>/<repo>/deployments that lists the deployments and the time they were deployed.

Choose github-pages from the environments drop-down list.

This helps to know if your latest git push was deployed at all.

Solution 4 - Github

Github pages are cached with CDN.So the user has to clear the site cache everytime to load new changes.To overcome this you can use meta tags in the HTML code, they will load the webpage without caching.Include this in your index.html file.

<meta http-equiv='cache-control' content='no-cache'> 
<meta http-equiv='expires' content='0'> 
<meta http-equiv='pragma' content='no-cache'>

Using this you won't get a cached version of your page.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMYjxView Question on Stackoverflow
Solution 1 - GithubJoel GlovierView Answer on Stackoverflow
Solution 2 - GithubasidisView Answer on Stackoverflow
Solution 3 - Githubuser650654View Answer on Stackoverflow
Solution 4 - GithubAakash KhandelwalView Answer on Stackoverflow