devxlogo

Control How Browsers Cache Your Page

Control How Browsers Cache Your Page

Question:
Is there a way to force a page to load from the server rather than from the cache? The META refresh and onLoad=reload() both just send the page into an infinite loop.

Answer:

Yes, you can use META tags to control how browsers cache your pages. This tag specifically asks your browser not to cache the current page:

This other META tag construct tells the browser that if it does cache the page, it should remove it from the cache on the specified date (in this case, January 1, 1999 at 1am).

If you really don’t want a browser to cache your page you should use these two tags together, specifying a date in the past for the second tag.

devx-admin

Share the Post: