Skip to content

Cache off

December 12, 2008

// Set to expire far in the past.
res.setHeader(“Expires”, “Sat, 6 May 1995 12:00:00 GMT”);

// Set standard HTTP/1.1 no-cache headers.
res.setHeader(“Cache-Control”, “no-store, no-cache, must-revalidate”);

// Set IE extended HTTP/1.1 no-cache headers (use addHeader).
res.addHeader(“Cache-Control”, “post-check=0, pre-check=0”);

// Set standard HTTP/1.0 no-cache header.
res.setHeader(“Pragma”, “no-cache”);

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: