Skip to content

disable cache

May 20, 2008
If enabled, creates an issue in file download, because IE tries to download the cache beforehand and cannot,
for that do the following:
response.setHeader(“Cache-Control”, “”);
For gzipped compressed data sending: (Deflated by the browser on receiving)
response.setHeader(“Content-Encoding”, “gzip”);
Before sending – check if browser supports the encoding type – from the header  req.getHeader(“accept-encoding”);

In HTML: (in the header)

<META HTTP-EQUIV=”Cache-Control” CONTENT=”no-cache”>
<META HTTP-EQUIV=”expires” CONTENT=”0″>

Make HTTP POST call — only HTTP GET calls are served from cache or (2) Make sure the HTTP GET URL is different every time.Append a unique parameter to the HTTP GET call so that the URL is different every time. A unique time stamp is a good choice

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: