How To Stop Caching By ISP Proxy Servers

M

Meron Lavie

We have written an asp.net app, which is apparently being cached by various
British ISP's, and this is recking havoc with our app, as the proxy servers
apparently are disregarding the session id within the URL (we work
cookieless), such as www.widgets.com/(asdiufya09r8)/mypage.aspx, and thus
can not identify to which user/session each page belongs.

We have tried all the textbook solutions, such as:

<%@ outputcache duration="1" varybyparam="none" Location="None" %>

<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">

Response.Cache.SetExpires(DateTime.Now.AddMonths(-1));

<META HTTP-EQUIV="Cache-Control" CONTENT="Public">
<meta http-equiv="Cache-Control" content="no-store">

<meta http-equiv="Cache-Control" content="must-revalidate">

We'd be grateful for any suggestions how to absolutely block caching.



TIA,

Meron Lavie
 
B

bruce barker

this is no way to force a proxy to honor your caching request, they are only
hints. if the proxyserver is ignoring the no-cache, url decoration is a
common way to invaldate the cache.

myurl.aspx?r=<random number>

just tack a new randowm number on every page request. (you will need to use
client code to rewrite the postback url if you are using asp.net's postback
model). a filter could also do the work.




-- bruce (sqlwork.com)
 
M

Mark Kreimerman

Bruce,



We have also tried passing the random number to the URL, but it didn't help.

In addition the proxy might consider a Session ID as a part of the link as a
un-cached page and bring it from the server, but unfortunately the old
cached URL(with different Session ID) comes from the proxy.



Best regards,

Mark
 
Joined
Jul 16, 2007
Messages
2
Reaction score
0
help regarding stoping caching in proxy server

Can u plz help me in the scenerio which is some what the same .. .as its addressing here

sccenario:

we have a proxy server which is assigned by a fixed ip and user access it through proxy ...

we have deployed our application over there, which is built in ASP.NET 2.0 and we have also used seperate javascript files (*.js) and proxy server as usual caches the page and javascript files

when ever we have some changes we deploy our application again at the proxy server

but when we run the application it uses the same cached javascript files and dont use the new one which we have deployed

We are using Squid 2.5 as our proxy server

We have done this in our Page.

protected override void OnLoad(EventArgs e)

{

Response.Cache.SetNoStore();

Response.Cache.SetCacheability(HttpCacheability.NoCache);

Response.Cache.SetExpires(DateTime.Now);

base.OnLoad(e);

}

But this solves the problem only on LAN.

For fixed IP, caching problem persists.

can you help me in this regard that what should i do ???

wat should i do inorder to stop proxy server to cache javascript files
 

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,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top