1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to blank IE cache via ASP?

Discussion in 'C#' started by JJnacy, Jun 15, 2009.

  1. #1
    I like to clean IE cache so IE do not keep old info.
    Please use ASP
    SEMrush

    Thanks,
     
    JJnacy, Jun 15, 2009 IP
    SEMrush
  2. dopanel.com

    dopanel.com Peon

    Messages:
    94
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Response.Buffer = -1 'All the buffer expires @ -1 second(1 second ago).

    But if you want to clean all the websites' tmp file of the browser ,then no command can do that!
     
    dopanel.com, Jun 15, 2009 IP
  3. thewebhostingdir

    thewebhostingdir Well-Known Member

    Messages:
    3,850
    Likes Received:
    84
    Best Answers:
    0
    Trophy Points:
    165
    #3
    It is not possible to clear any browsers' cache using the server side scripting.
     
    thewebhostingdir, Jun 15, 2009 IP
  4. DoDo Me

    DoDo Me Peon

    Messages:
    2,258
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Response.Expires = -10000;
    Response.AddHeader('Pragma', 'no-cache');
    Response.AddHeader('Cache-Control', 'no-cache, must-revalidate');
    Response.CacheControl = 'private';
     
    DoDo Me, Jun 16, 2009 IP
  5. Corwin

    Corwin Well-Known Member

    Messages:
    2,438
    Likes Received:
    107
    Best Answers:
    0
    Trophy Points:
    195
    #5
    This is the only instruction that guarantees that the page will only be cached as long as needed:

    <%
    Response.AddHeader "cache-control","no-store"
    %>


    This means that the page will be removed from the user's cache immediately, when the user navigates away from the page.

    Be warned, however - if the user moves away from the page, and then hits the back button to go back to the page, because it has been removed from the cache it may cause problems depending upon your browser.

    According to RFC2616, "If sent in a request, a cache MUST NOT store any part of either this request or any response to it. If sent in a response, a cache MUST NOT store any part of either this response or the request that elicited it."

    Let me know if this helps!
     
    Corwin, Jun 17, 2009 IP
    JJnacy likes this.