force cache to expire in Netscape or Mozilla

S

sam

Hi,

the following works fine with IE:

<%
Response.CacheControl = "no-cache"
Response.AddHeader("Pragma", "no-cache")
Response.ExpiresAbsolute = DateTime.Now.Date
Response.Expires = -1
%>

How do you make that working with netscape or mozilla firefox ???

thanks
 
J

Joerg Jooss

Thus wrote sam,
Hi,

the following works fine with IE:

<%
Response.CacheControl = "no-cache"
Response.AddHeader("Pragma", "no-cache")
Response.ExpiresAbsolute = DateTime.Now.Date
Response.Expires = -1
%>

That's ASP legacy code. In ASP.NET, this all folds to

<%@ OutputloCation="None" %>

or

Response.Cache.SetCacheability(HttpCacheability.NoCache);

Unfortunately, navigational controls like back or forward are not necessarily
tied to the browser's cache. That's probably your problem here.

Cheers,
 
S

sam

good point. that's my problem and this is why I've posted it, to get an
solution :)
thanks for correcting my syntax by the way.
 
J

Joerg Jooss

Thus wrote sam,
good point. that's my problem and this is why I've posted it, to get
an solution :)

As I said, there's no standard approach to influencing navigation controls
from the server side. You may even find certain older Mozilla versions where
this works, but in the end, it's neither reliable nor intended by the HTTP
spec.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top