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