Results 1 to 6 of 6

Thread: Cache

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    345

    Cache

    How to ensure that the page is not loaded from the cache when hit the back button of the browser in ASP.NET?
    Thanks.

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Re: Cache

    Just don't cache the page.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  3. #3
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: Cache

    I think he means stopping the browser caching the page.

    Code:
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    Response.Cache.SetAllowResponseInBrowserHistory(false);
    The first method sets the cache-control HTTP header. This header controls how docuemtns are cached on the cache capable devices.

    The second method indicates whether the response will be kept in the browser history.

    HTH

    DJ

    If I have been helpful please rate my post. If I haven't tell me!

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    345

    Re: Cache

    Shall I place this code in the Page_Load event. I am using vb.net as the code behind for asp.net
    Thanks.

  5. #5
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: Cache

    That'll do it!

    DJ

    If I have been helpful please rate my post. If I haven't tell me!

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    345

    Re: Cache

    Thanks a bunch.
    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width