Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Caching?

  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    Loughborough (UK)
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Caching?

    Hi,

    I have a page that opens modal window. The user can select an item from a list (driven by the database) on this modal and the value is returned to the parent window. However, if the database has changed since the last time the window was opened, this new data isn't pulling through... it appears the page is cached in the browser. If you change the browser settings to 'check for a new page every time', this it picks up the changes, but as I am sure you will appreciate, I can't tell all users to do this.

    Is there a way that I can code the page to not ever be cached?

    Thanks in advance for your help.

    Regards,
    Chris

  • #2
    Regular Coder
    Join Date
    May 2006
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Go to http://www.codeproject.com/aspnet/ThoseCrazyPopups.asp and scroll down to the following code and see if it help:

    Code:
    Response.Cache.SetNoServerCaching()
    Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache)
    Response.Cache.SetNoStore()
    Response.Cache.SetExpires(new DateTime(1900,01,01,00,00,00,00))


  •  

    Posting Permissions

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