Skip to main content
Participant
May 17, 2021
Question

Issue: End users needing to clear cashe

  • May 17, 2021
  • 2 replies
  • 216 views

Hello, I was wondering if there is a way to avoid our users having to constantly clear their cashe to access updated topics. The updated topics do not automatically refresh and we are constantly telling users to clear their cashe. Is there a fix for this in the output?

    This topic has been closed for replies.

    2 replies

    Community Manager
    May 17, 2021

    Generally said, it's an end-user browser issue. Browsers cache the visited page and when accessed in the same session or within (x) days, they presented the cached page to save bandwidth.

    However, clearing the cache is usually not necessary. Users can simply "shift-reload" reload a page. That is, hold the shift key and click the reload button or Shift+Browseshortcut for a page reload (e.g., Shift + F5 or Ctrl+Shift+R in Chrome on Windows.

    Alternatively, you can "ask" the browser to not cache the file and always reload it by adding these three lines to the <head> section of your topic:

     

    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="-1" />
    <meta http-equiv="Cache-Control" content="no-cache" />

     

    I guess it's self-explaining? By the way, you could also set Expires to a specific date and time to ask the browser to load the page when accessed before that date-time and load it fresh from the server after that. Note that the time should be in Greenwich Mean Time (GMT) and written in the format, dd Mon yyyy hh:mm:ss.

    But be mindful about it asking not to cache. Caching also brings performance advantages for the client and saves bandwidth. Maybe you only want to add this in topics that are very frequently updated.

    Jeff_Coatsworth
    Community Expert
    Community Expert
    May 17, 2021

    I thought the only way you could control this sort of thing was by including something on your webserver's settings to force a refresh, but I have no idea how to go about it.