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
  • 831 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
    Adobe 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

    Let me see if I understand this... and please correct me when I go off the rails..

     

    In my case, all webpages use a common css file: global.css. So every page has the link:

            <link href="../css/global.css" rel="stylesheet" type="text/css" />
     
    All I have to do is change this link to: 
            <link href="../css/global.css?v=20250827" rel="stylesheet" type="text/css" />
     
    I don't need to do anything to the css file. (there isn't really a version, as such)
     
    The only thing that matters is that I have changed the string: "v=####" to something different.  So if the webpage in the visitor's cache has a different link, say "....v=20250705",  then it knows it's a new file and reloads it.
     

    Can I use this technique on just about any link in my <head> section. Whether to a css, js, or whatever?

     

    Does "...v=####" have any function other than making the link just "look" different. Could it be "...u=rodney", for example.

     

    I would go with a date stamp. If it's this simple, I'm loving it. But I imagine there are a bunch of caveats - There usually are.
    BenPleysier
    Adobe Expert
    August 27, 2025

    Trying this and it's not working - Obviously not as  easy as I hoped. 

     


    Try adding HTTP-equivalent headers via meta tags in the <head> section.

     

    <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 encourages browsers to revalidate the page on each visit. Caveat: Doesn’t affect linked assets like CSS/JS unless those are also versioned as previously shown..

    <link rel="stylesheet" href="style.v2.css">
    <script src="main.v2.js"></script>

     

    Use DW’s powerful Find & Replace to update version strings across multiple files.

    • Example: Replace style.css?v=1.1 with style.css?v=1.2 across all .html files.
    • How: Edit > Find and Replace > Entire Site with regex or string match.

     

    If this does not work, you may be using a Service Worker to cache the douments and associated files. In that case you will need to version the Service Worker.

     

     

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Nancy OShea
    Adobe 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 &amp; Moderator
    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. 

     

    Adobe 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.