Retrieval of large dataset flushes browser back/forward navigation cache

  • Thread starter Thread starter Steve Guidi
  • Start date Start date
S

Steve Guidi

Hello,

I am experiencing a problem with the back/forward page cache of IE,
and from my investigation, I believe that it is related to the size of
dataset that is returned from a query. I don't understand the
underlying cause of the problem as I am able to reproduce it under
different conditions -- perhaps someone in this newsgroup can help.

Here is a simple example that demonstrates the problem.

I created a web application with two WebForms (WebForm1, and
WebForm2). Each contains one DataGrid, and WebForm1 contains a
button.

The Page_Load() event handler for both of the WebForms is as follows.

if( !IsPostBack ) {
SqlCommand oCommand = new SqlCommand( "SELECT * FROM Orders", new
SqlConnection( "server=(local);database=Northwind;Integrated
Security=SSPI" ) );
oCommand.Connection.Open();
DataGrid1.DataSource = oCommand.ExecuteReader();
DataGrid1.DataBind();
oCommand.Connection.Close();
}

The On_Click() event handler for the button redirects to WebForm2:

Response.Redirect( "WebForm2.aspx" ).


After I execute the program, I press the button on WebForm1 to load
WebForm2. I then use the browser's back button to return to WebForm1
and the forward button to go back to WebForm2, completing a
round-trip.

The problem is now that the browser's back button is disabled. If I
vary the size of the dataset that is returned from the queries using
"SELECT top 10 * FROM Orders", then the back button on WebForm2 is
always enabled.

In the former case, why does the browser's back button become
disabled?

My IE Version is 6.0.2800.1106.xpsp2.030422-1633 and .NET Framework
version is 1.1.4322.

Any insight to the cause of the problem is much appreciated.

Thanks!
Steve Guidi
 
IMO, it could have something to do with the disk space used/allocated to the
IE cache... What are these figures compared with the size of the HTML output
?

Patrice
 
Hi Patrice,

Thank you for your advice; The IE disk cache was the problem.

In the application that initially exhibited this behaviour, the HTML
output can grow to the order of megabytes. The disk cache was set to
100MB, so it would take a bit of time after purging the cache for
behaviour to manifest itself (hence why I didn't notice it earlier).

After purging and increasing the size of the cache, I was able to
navigate between the two pages as expected.


Thanks again for the tip!

Steve
 
Back
Top