Why Isn't My Website Updating After Pushing Code? (It Worked Before) #155241
-
Select Topic AreaQuestion Feature AreaProjects BodyHi everyone, I successfully pushed my code to GitHub, but the website is still showing the old version of the interface. I’ve tried clearing the cache using Ctrl + Shift + R, but it didn’t work this time (this method used to solve the issue before). Could you help me figure out why this keeps happening? I’ve encountered this issue quite a lot, and the only workaround I’ve found is creating a new repository every time, which is really inconvenient. Also, is there a keyword or method I can use to ensure users always see the latest version of the website without needing to clear their cache? Right now, I have to clear the cache every time I push new code to update the site, and it’s quite frustrating. Thanks in advance for your help! Guidelines |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
|
Some one helps me huhuhu |
Beta Was this translation helpful? Give feedback.
-
|
Hi @bao3004, thanks for being a part of the GitHub Community! The Are you deploying via GitHub pages or another hosting site? |
Beta Was this translation helpful? Give feedback.
-
|
Try giving the link to the project or the code you are using or even any other leads to help you. |
Beta Was this translation helpful? Give feedback.
-
|
@hfksue123 Hi there
Update version like |
Beta Was this translation helpful? Give feedback.
-
|
GitHub Pages (and most CDNs) add aggressive caching with headers like Verify in Settings → Pages that it’s building from the correct branch (e.g. Append version or hash to file URLs, e.g.: <link rel="stylesheet" href="/style.css?v=20250608">
<script src="/app.js?v=20250608"></script>OR Insert in your <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">This helps some browsers check back each load |
Beta Was this translation helpful? Give feedback.
If you're deploying using GitHub Pages, it typically builds from the main branch by default. It might be helpful to check the existing build configurations and try changing the deployment source to a different branch to see if that reflects the changes.
Also, make sure to check the Pages deployment status to confirm whether the build was successful or if there were any errors.