auto-refresh cached pages - how to force cache refresh

2 replies
  • WEB DESIGN
  • |
hi - anyone know the best way to force an index.html page to a) check to see if any changes have been made, and if so, b) refresh/clear cache and reload ?

if and when I update a index.html page, I'd like to make the page reload/refresh cache. but I don't want to make it reload from cache if I haven't changed the page (so it's faster to reload for visitors). any easy way to make it check and if any changes, refresh/reload from cache?



thx,

k
#autorefresh #cache #cached #force #pages #refresh
  • Profile picture of the author Michael71
    You can not clear the cache from your visitors browser.

    What changes are you talking about?

    The only way I see is using AJAX
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[7949686].message }}
  • Profile picture of the author SteveJohnson
    There is no reliable way to do that from a straight html page. You have to be able to send HTTP headers that tell the browser to reload the page, and that comes from a scripting language like PHP.

    Browsers are pretty smart, though - they don't just go reloading cached content forever. In practice, if you change the html content of a file, the browser will usually reload it.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[7954685].message }}

Trending Topics