Browser Caching Problem

Discussion in 'ASP .Net' started by =?Utf-8?B?amxvdG1hcg==?=, Jul 11, 2006.

  1. I am currently experiencing a problem whereby browser caching seems to be
    causing my page to be invalid.

    I am using a standard DataGrid WebControl which is bound to a DataView
    object. I use a link in the DataGrid control to go to a details page for the
    record to edit a number of different fields for the record. After updating
    the dataset and database, I use a response.redirect (I’ve also tried
    Server.Transfer) to return to the first page with the DataGrid. The problem
    is that the DataGrid does not reflect the changes I’ve made to the database.
    If I step the page load procedure in debug mode, the DataGrid does update and
    I see the new data. If I don’t, I don’t see the new data until I hit the
    refresh button or click on the link to go to the page directly.

    I’ve tried to use the HTML metatags ‘<meta http-equiv="Pragma"
    content="no-cache">’ and ‘<meta http-equiv="expires" content="0">’ but they
    don’t seem to work. I have the same problem if I’m using IE or Firefox.
    I’ve also tried to use ‘OutPutCache Location=â€noneâ€â€™ (which as I don’t think
    is related) with no success.

    Any help, ideas, comments, suggestions would be appreciated.

    --
    Jonathan
    =?Utf-8?B?amxvdG1hcg==?=, Jul 11, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?amxvdG1hcg==?=

    Collin Chung Guest

    Hi Jonathan,

    Right now, I can think of one old school way of dealing with browser
    (and even proxy) caching, which is to append the url with a random
    query string to make it look unique to the browser, eg.

    Response.Redirect("grid.aspx?K12dU33jb1kjj22")

    Collin Chung


    jlotmar wrote:
    > I am currently experiencing a problem whereby browser caching seems to be
    > causing my page to be invalid.
    Collin Chung, Jul 12, 2006
    #2
    1. Advertising

  3. An Update since yesterday...

    I've set some values in the PageLoad procedure and found that even though
    the datgrid does not refresh, the values in the page load procedure do. So,
    for example, I create an HTML comment with the current date/time the FormLoad
    procedure ran and that is updated every time as expected. But the datagrid
    is seems to be the only part being cached.
    --
    Jonathan


    "jlotmar" wrote:

    > I am currently experiencing a problem whereby browser caching seems to be
    > causing my page to be invalid.
    >
    > I am using a standard DataGrid WebControl which is bound to a DataView
    > object. I use a link in the DataGrid control to go to a details page for the
    > record to edit a number of different fields for the record. After updating
    > the dataset and database, I use a response.redirect (I’ve also tried
    > Server.Transfer) to return to the first page with the DataGrid. The problem
    > is that the DataGrid does not reflect the changes I’ve made to the database.
    > If I step the page load procedure in debug mode, the DataGrid does update and
    > I see the new data. If I don’t, I don’t see the new data until I hit the
    > refresh button or click on the link to go to the page directly.
    >
    > I’ve tried to use the HTML metatags ‘<meta http-equiv="Pragma"
    > content="no-cache">’ and ‘<meta http-equiv="expires" content="0">’ but they
    > don’t seem to work. I have the same problem if I’m using IE or Firefox.
    > I’ve also tried to use ‘OutPutCache Location=â€noneâ€â€™ (which as I don’t think
    > is related) with no success.
    >
    > Any help, ideas, comments, suggestions would be appreciated.
    >
    > --
    > Jonathan
    =?Utf-8?B?amxvdG1hcg==?=, Jul 12, 2006
    #3
  4. I did try that and it still has the same problem. The datagrid information
    does not appear to change even though the rest of the page is updating.
    --
    Jonathan


    "Collin Chung" wrote:

    > Hi Jonathan,
    >
    > Right now, I can think of one old school way of dealing with browser
    > (and even proxy) caching, which is to append the url with a random
    > query string to make it look unique to the browser, eg.
    >
    > Response.Redirect("grid.aspx?K12dU33jb1kjj22")
    >
    > Collin Chung
    >
    >
    > jlotmar wrote:
    > > I am currently experiencing a problem whereby browser caching seems to be
    > > causing my page to be invalid.

    >
    >
    =?Utf-8?B?amxvdG1hcg==?=, Jul 12, 2006
    #4
    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. Hypo
    Replies:
    6
    Views:
    407
  2. R. Ian Lee

    Prevent Browser Caching for a Page

    R. Ian Lee, Oct 22, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    8,328
    Jacob Yang [MSFT]
    Oct 23, 2003
  3. Troy Simpson

    Fragment Caching inside page caching?

    Troy Simpson, Jan 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    786
    Troy Simpson
    Jan 19, 2004
  4. praveen
    Replies:
    3
    Views:
    10,221
    praveen
    Sep 15, 2004
  5. JimLad
    Replies:
    3
    Views:
    913
    JimLad
    Jan 21, 2010
Loading...

Share This Page