How to Prevent Caching of Your Web Page
How to Prevent Caching
The web documents, media and other web resources that are retrieved by a web browser are often saved, or cached, locally on the user’s hard drive.
Caching reduces load times when a user browses the Internet by reducing the amount of new data that needs to be transferred. The next time the cached media or web resource is requested, the web browser may load the local (cached) file instead of downloading it over the Internet.
Caching may be desirable for web content that doesn’t change often, but undesirable for documents that are updated frequently with new content and/or information. If content changes frequently, then large amounts of hard drive space are taken up, but web-page loading times are not reduced.
Browser Side Caching Prevention
There are several methods to prevent browser caching of your website. For the individual user, the simplest method is to disable caching on the user’s web browser. Listed below is the process to disable broswer caching in most pular web browsers:
Disable Caching in Internet Explorer
- Open Internet Explorer and select the “Tools” pull-down menu
- Select “Internet Options”
- Select “Temporary Internet Files”
- Select “Settings”
- Under the heading “Check for newer versions of stored pages”, choose the “Every time I visit the webpage” option.
- To restore caching, reverse the above procedure.
Disable Caching in Firefox
- Open Firefox and select the “Tools” pull-down menu.
- Select “Options.”
- Click the “Network” tab.
- Under “Offline Storage” enter a zero (0) in the total amount used in the cache.
- To restore caching, reverse the above procedure,increasing the cache value as appropriate.
Server Side Cache Prevention
If you’re a web host, and you change your content frequently, you can automatically disable caching for your users.
Listed below are solutions that use several different server-side methods to disable caching:
Using Meta-Tags to Prevent Caching
- Open your web page’s code.
- Enter the following tag into the header:
- <meta http-equiv=”Pragma” content=”no-cache”>
<meta http-equiv=”Expires” content=”-1″>
<meta http-equiv=”CACHE-CONTROL” content=”NO-CACHE”> - This process will disallow caching.
Using JavaScript and CSS File Headers
If browsers are caching these files incorrectly, the HTTP headers that the web server is sending are incorrect and will need to be changed, along with the actual JS and CSS files. The browser uses HTTP headers for direction on where to cache the file.
Note, however, that the HTML page using the JS and CSS will not need to be changed.
Your web server can send these headers (on every JS and CSS file it serves) to tell browsers not to cache them:
- In a JQuery window, enter the following script into the file header:
- Cache-Control: no-cache.
- Pragma: no-cache.
- Expires: Sat, 01 Jan 2099 00:00:00 GMT (or the date & time of user’s choice).
There are several other options available to prevent caching via server-side controls, but the aforementioned methods are the most common and efficient.
Users may desire to explore the controls available using Apache Server tools for more advanced methods.
Comments (2)
Leave a Reply
- How to Prevent Downloading of Your Entire Website
Preventing Web Site Downloading Using robots.txt The first step is to disallow the downloading programs in your robots.txt file. To do this, you will need to define which bad robots you wish to disallow. Disallowing bad programs in robots.txt does not prevent all web site downloading, because many bad programs simply ignore the contents of [...]...
- How to Prevent Hotlinking
Hotlinking, also known as deep linking, occurs when one web site links directly to graphics files on another web site. The site which serves the images pays for the bandwidth. The site which links to the images gets free content for its users. Many webmasters object to being hotlinked to, but hotlinking is difficult to [...]...
- Configuring ISA Server Dial-up Connections
Configuring Dial-up Connections and Dial-up Entries Before you can configure ISA Server dial-up connections, you have to create the necessary policy elements. ISA Server dial-up connections are typically configured when you want to access services that are not Web services, on clients that do not have the Firewall Client installed. These services are usually the [...]...
- Migrating from Proxy Server 2.0 to ISA Server
Why Upgrade to ISA Server A few reasons for migrating from Proxy Server 2.0 to ISA Server are listed here: You need a H.323 Filter Gatekeeper. You need a multi-layered firewall. You need a firewall client. You need to perform SSL traffic inspection. You want to perform email-content screening. Stateful inspection has become important. You [...]...
- Installing ISA Server
Modifying the Local Address Table (LAT) for ISA Server Installation When ISA Server runs as a firewall (install ISA Server in Firewall mode or in Integrated mode), ISA Server uses the Local Address Table (LAT) to determine the following information so that it can implement access rules: Determine the IP addresses on the private network. [...]...





Good Luck!
THANK YOU!!!!
I wish I’d found this a year and a half ago!
I’ve been running a book publishing website and we’re constantly updating the pages and I’m constantly having to tell people “Just hit refresh” – but NO MORE! I just tested the meta tag’s in the new young adult site we’re launching later this month and TA DA! It did EXACTLY what I needed it to!
Now I just need to go back and add it onto ALL of the original websites pages (yikes!)
THANK YOU!!!!