Board index » Web Programming » Browser Caching Problem

Browser Caching Problem

Web Programming117
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


-
 

Re:Browser Caching Problem

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:

Quote
I am currently experiencing a problem whereby browser caching seems to be

causing my page to be invalid.



-

Re:Browser Caching Problem

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:



Quote
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

-

Re:Browser Caching Problem

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:



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





-