<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>54960</bug_id>
          
          <creation_ts>2011-02-22 08:13:40 -0800</creation_ts>
          <short_desc>window.location become broken in page cache</short_desc>
          <delta_ts>2011-02-22 16:20:46 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>34679</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Peter Leonov">gojpeg</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>355281</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Leonov">gojpeg</who>
    <bug_when>2011-02-22 08:13:40 -0800</bug_when>
    <thetext>The object of window.location become broken if one leaves the page and then presses the back button.

The following simple example may be a good illustration:

var loc = window.location
setTimeout(function () { alert(loc == window.location ? &apos;PASS&apos; : &apos;FAIL&apos;) }, 1000)
window.location.href = &apos;a-history-back-page.html&apos;

Here we cache the location object in a variable,
set a timer to check the variable after back button is pressed,
navigate to the page which sends us back,
and get the “FAIL” alert.

The a-history-back-page.html has the only JavaScript line:
window.history.back()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355681</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-02-22 16:20:46 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 34679 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>