[thelist] .NET keep an html page from caching

Ken Schaefer Ken at adOpenStatic.com
Wed Jan 10 17:06:27 CST 2007

Send proper HTTP headers (via HTTP Module, ISAPI Filter, IIS Settings or by
putting .NET code into the HTML page).


From: thelist-bounces at lists.evolt.org on behalf of Casey Crookston
Sent: Thu 11/01/2007 1:18 AM
To: thelist at lists.evolt.org
Subject: [thelist] .NET keep an html page from caching

A client has a directory on their site which is secured via forms
authentication.  They wanted to prevent viewers from accessing .html
files w/o first entering a password, so in IIS I changed the executable
path to the .net dll, which seems to work.

However, after a user logs out, if they then return to the .html page,
the page is cached and displays in the browser.  Hitting refresh solves
the problem and kicks them to the login page, but that's not good enough
for the client.  We put <meta http-equiv="pragma" content="nocache"> in
the head of the .html files, but that doesn't do the trick either.

Any other tricks out there?

Thanks, Casey


* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !

More information about the thelist mailing list