Skip to main content
Participating Frequently
August 26, 2025
Question

How do I force a refresh when users view my updated web pages?

  • August 26, 2025
  • 3 replies
  • 1034 views

As I am updating the pages on my websites, I am wondering how to ensure that readers are always getting the latest versions of each page. I don't want to force cache clearance all the time, only when the page has been updated. Is this what they call "cache busting"? How do I implement it?

 

 

    3 replies

    BenPleysier
    Community Expert
    Community Expert
    August 27, 2025

    Hi @SeanKK ,

    You're spot on, what you're referring to is indeed called cache busting, and it's a common strategy to ensure users see the most up-to-date version of your web pages without forcing a full cache clear every time.

     

    My favourite method is to append a version or timestamp to the modified asset's URL as in 

    <link rel="stylesheet" href="styles.css?v=2.1">
    <script src="script.js?v=20250827"></script>
    

    Each time you update the file, change the version number. Browsers treat it as a new file and fetch it fresh.

     

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    SeanKKAuthor
    Participating Frequently
    August 27, 2025

    Hi Ben. I'll look at this and try to understand it. It looks like I have to manually insert a time stamp whenever I update a page. I hoped there was a way to get the reader to compare the saved-date of the file, with the one they have in cache, but maybe that information just isn't registered.

    Nancy OShea
    Community Expert
    Community Expert
    August 26, 2025

    In my browser, "hard refresh" is achieved with Ctrl + F5 or Ctrl + Shift + R. 

     

    How often do you update content on your website? I ask because you can set an appropriate content expiry date in the <head> tag.

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Expires

     

    Also see Cache-Control

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control

     

     

    Nancy O'Shea— Product User & Community Expert
    SeanKKAuthor
    Participating Frequently
    August 27, 2025

    Hi Nancy. I update pretty randomly. Some pages might get to be months old, while I might update others more than once a day. I just uploaded a major revision that affects all pages, and I notice that it won't work without reloading practically the whole site. 

    Thank you for the links - I will definitely study them - I can see already that cache behaviour, in general, is something that I need to look at. 

     

    Community Expert
    August 26, 2025

    Are you using a CMS or what are you using to cache your site today? Could you share an example page? If you are using a CMS like Wordpress there may be plugin options, if not depending on what you using to cache will help to determine a viable solution. 

    SeanKKAuthor
    Participating Frequently
    August 27, 2025

    Thanks Ben. I'm not using any sort of CMS, just HTML, CSS and JS, although I have minimal understanding of the last (I just copy samples \ suggestions). You can see one of the sites at GaleodanSuites.com . Very basic stuff, and I'm not sure I am using anything to cache (if that means putting something in the head section).  Will start looking at CMS options so that family can take over when I'm too gaga. Meanwhile it excercises my faculties and serves the purpose. I see other suggestions coming and will respond further when I have had a chance to study them.