promisefeni / reallysimplehistory

Automatically exported from code.google.com/p/reallysimplehistory
Other
0 stars 0 forks source link

Assignment window.location.hash cause double loading #84

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. We have a page X (i.e www.abc/homepage.aspx) contains a form has one
hidden field keeps one link contains hash (#abc). When click one button,
the form is submitted to server and call Response.Redirect(linkx) with
linkx contains hash (i.e www.abc/homepage.aspx#abc)
2. When running to the following assignment, dhtmlHistory or IE or
something call page X one more time:
     // change the browser location
     window.location.hash = newLocation;

Please see the attachment for more details.

What is the expected output? What do you see instead?

I wonder why we go to this case, must include all of following conditions,
the double loading occurs:
"when we submit a form to server and have Redirect action to one link
contains hash"

Is there any bugs on IE or dhtmlHistory right here?
Thanks,
Tin

Original issue reported on code.google.com by betweenl...@gmail.com on 9 Apr 2009 at 8:39

Attachments:

GoogleCodeExporter commented 8 years ago
I also encounter this issue in IE. If the page already has a hash location, and 
RSH
assigns it to the very same location, in IE this causes the entire page to 
reload
(which destroys the rest of my javascript state). 

Original comment by ajshan...@gmail.com on 28 May 2009 at 6:29

GoogleCodeExporter commented 8 years ago
I think this is a nasty bug in IE. I also got this. When someone clicks a link 
to our site (containing a hash) and then sets a hash location (even if it is 
the same hash as is already there) then IE double loads the page _and_ keeps 
the old javascript running  in the background (with timers and whatnot..) 
including the javascript code in the new load. 

Original comment by e...@svensktkosttillskott.se on 13 Aug 2010 at 10:42

GoogleCodeExporter commented 8 years ago
I get this same problem. A Serious issue.

Original comment by jasonsil...@crookedbush.com on 21 Jan 2012 at 1:26