J
Jenny
Need urgent help for an unsolved problem. In our ASP web application,
we creat a Back button and if user click on this button, it execute
history.go(-1) to go back to the previous page. All our users use IE
6.0 and most of them don't have problem with this button. But one user
reported everytime he click on this button, there is a pop-up window
shows up and ask him refresh and reload the page, after he clicks OK,
the previous page will be loaded with all the empty fields. So he will
lose all his input. I searched the google, it did mention there is
problem with Netscape for history.go(-1), but can not find any
articles for IE. And then I realized I use Response.Expires=0 to
disable the cache and force the browser to reload, but according to
the discussion from Internet, it might work for some type of browser,
might not work for other types of browsers. But we all use IE, I use
IE 6.0, he use either IE5.5 or IE 6.0, why it won't expire cache on
mine, but on his? The following is my code's snippet. Your help is
HIGHLY appreciated.
<% Response.Buffer = True %>
<% Response.Expires = 0 %>
<% Response.AddHeader "Pragma", "No-Cache" %>
<script LANGUAGE="javascript">
<!-- Back Function
function BackUp()
{history.go(-1);}
-->
</script>
In the html code,
<form method="post" action="NextPage.asp" id="form1" name="form1">
/* lots of other stuff */
<p align="center"><input type="button" Onclick="BackUp();" value="Go
to
Previous Page" name="Back"><input type="submit" value="Go to Next
Page"
name="Submit"></p>
</form>
we creat a Back button and if user click on this button, it execute
history.go(-1) to go back to the previous page. All our users use IE
6.0 and most of them don't have problem with this button. But one user
reported everytime he click on this button, there is a pop-up window
shows up and ask him refresh and reload the page, after he clicks OK,
the previous page will be loaded with all the empty fields. So he will
lose all his input. I searched the google, it did mention there is
problem with Netscape for history.go(-1), but can not find any
articles for IE. And then I realized I use Response.Expires=0 to
disable the cache and force the browser to reload, but according to
the discussion from Internet, it might work for some type of browser,
might not work for other types of browsers. But we all use IE, I use
IE 6.0, he use either IE5.5 or IE 6.0, why it won't expire cache on
mine, but on his? The following is my code's snippet. Your help is
HIGHLY appreciated.
<% Response.Buffer = True %>
<% Response.Expires = 0 %>
<% Response.AddHeader "Pragma", "No-Cache" %>
<script LANGUAGE="javascript">
<!-- Back Function
function BackUp()
{history.go(-1);}
-->
</script>
In the html code,
<form method="post" action="NextPage.asp" id="form1" name="form1">
/* lots of other stuff */
<p align="center"><input type="button" Onclick="BackUp();" value="Go
to
Previous Page" name="Back"><input type="submit" value="Go to Next
Page"
name="Submit"></p>
</form>