How To Stop Caching By ISP Proxy Servers

Discussion in 'ASP .Net' started by Meron Lavie, Apr 27, 2004.

  1. Meron Lavie

    Meron Lavie Guest

    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
     
    Meron Lavie, Apr 27, 2004
    #1
    1. Advertising

  2. Meron Lavie

    bruce barker Guest

    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)



    "Meron Lavie" <> wrote in message
    news:#r$...
    > 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
    >
    >
    >
     
    bruce barker, Apr 27, 2004
    #2
    1. Advertising

  3. 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



    "bruce barker" <> wrote in message
    news:...
    > 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)
    >
    >
    >
    > "Meron Lavie" <> wrote in message
    > news:#r$...
    > > 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
    > >
    > >
    > >

    >
    >
     
    Mark Kreimerman, Apr 27, 2004
    #3
  4. Meron Lavie

    Scott M. Guest

    You may want to try:

    <% Response.CacheControl = "private" %>


    "Meron Lavie" <> wrote in message
    news:%23r$...
    > 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
    >
    >
    >
     
    Scott M., Apr 30, 2004
    #4
  5. Meron Lavie

    anilakhwaja

    Joined:
    Jul 16, 2007
    Messages:
    2
    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
     
    anilakhwaja, Jul 16, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris
    Replies:
    2
    Views:
    428
    iksrazal
    Mar 23, 2005
  2. alonr
    Replies:
    0
    Views:
    289
    alonr
    May 18, 2006
  3. John

    Caching and Proxy Servers

    John, Sep 14, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    345
  4. anilakhwaja

    How to stop caching in Proxy Server

    anilakhwaja, Jul 16, 2007, in forum: .NET
    Replies:
    0
    Views:
    549
    anilakhwaja
    Jul 16, 2007
  5. OttawaTrade

    How to stop DBM/Perl crashing servers?

    OttawaTrade, Sep 13, 2005, in forum: Perl Misc
    Replies:
    9
    Views:
    684
    Keith Keller
    Sep 13, 2005
Loading...

Share This Page