Bug in ie5 history handling of expiring pages

Discussion in 'Javascript' started by Lasse, Aug 29, 2003.

  1. Lasse

    Lasse Guest

    Hi Good people,

    I have a problem that I hope someone out there might
    have a work around for.

    I have some ASP pages that are dynamic so I do not normally
    want them to cache on the client. On the other hand they
    include some user input as well and I do want the user to
    be able to go back change some input on the last page and
    then submit that to get a new version of the next page.

    To achive this I give the pages a negative expire time as it
    is my understanding that this will let the user go back and
    forth in the history without accesing the server, but will
    refetch them when addressed in any other way.

    This works fine except for one detail. In one of the pages
    I open a pop up window and this will on ie5 (5.50.4807.2300)
    somehow confuse the browser. After the pop up has been open
    if you back out of the page the old page will be refetched from
    the server nulling out any user input. The same code works OK
    on Netscape.

    Has anybody familiar with this behaviour? Anybody now of a
    work around?

    The following code demonstrate the problem. If you run the page
    select something in the listbox, push go and then hit back so
    will the selection stay in the listbox. If you before leaving
    the page push open it will reload the page!

    <%
    Response.Expires = -1000 ' Expire at once
    %>

    <script language="JavaScript">
    function openGoogle()
    {
    // Format for the window
    var f = 'toolbar=no,location=no,directories=no,status=no,'
    f += 'menubar=no,scrollbars=no,resizable=yes,width=350,height=200'

    var url = '//www.google.com/';

    //Open progress window
    var v = window.open (url, '_blank', f)
    }
    </script>

    <body>
    <form name="f1" action="//www.w3.org/">
    <select name="foo" class="listbox">
    <option value="1" selected>val 1</option>
    <option value="2">val 2</option>
    <option value="3">val 3</option>
    </select>
    <input type="button" class="inputButton" value="open" onClick="openGoogle();">
    <input type="submit" class="inputButton" value="go">
    </form>
    </body>

    Any help greatly appreciated!
    Cheers,
    Lasse
    Lasse, Aug 29, 2003
    #1
    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. Tom
    Replies:
    0
    Views:
    1,021
  2. Gav

    expiring pages

    Gav, Jan 2, 2004, in forum: ASP General
    Replies:
    3
    Views:
    107
    Brynn
    Jan 3, 2004
  3. Sam Stephenson
    Replies:
    1
    Views:
    217
    Andrew Walrond
    Jun 18, 2005
  4. Replies:
    2
    Views:
    280
    nutso fasst
    Oct 17, 2006
  5. Niall
    Replies:
    3
    Views:
    157
    Niall
    Dec 6, 2006
Loading...

Share This Page