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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top