WebDevelopersNotes logo

home-icon Home / Web Development / How do I prevent caching of web pages by browsers?

How do I prevent caching of web pages by browsers?

How do I prevent caching of web pages by browsers?

The web pages you view are stored by your system inside the cache directory. Now, when you view these pages again, the browser searches the cache, and if it finds the page there, it displays it immediately. This presents problems to web developers when they update a page since the visitors see an older version (that was stored in the cache) of the page.

To prevent this from happening set the expiration date in the past inside the <meta>. Thus the browser reloads the page every time the user visits.

Here is the code:

<meta http-equiv="expires" value="Thu, 16 Mar 2000 
11:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

Sponsored Links

Your comments
Star icon IMPORTANT Have a question / problem? Click here to ask an expert.

Web browser funny images and jokes

Sponsored Links

Tips

How do I view a deleted web page?
Is there a way to view a deleted web page - one that is no longer available? Yes there is and the solution is quite simple. [more...]

Fact

Twitter @congressedits account tweets each time a Wikipedia article is modified by someone using the IP address belonging to the US Congress. [more...]

We use cookies to give you the best possible website experience. By using WebDevelopersNotes.com, you agree to our Privacy Policy