promisefeni / reallysimplehistory

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

Refresh not recognized as history event in IE6 & IE7 #42

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a history listener method with an alert("hi") or something and
instantiate dhtmlHistory.
2. Refresh the page in Safari, IE6 or 7 and nothing occurs. The listener
method isn't executed.
3. Refresh the page in Firefox and you will see "Hi" alert as the listener
function is executed.

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

Consistent calling of the history listener method when the window was reloaded.

What version of the product are you using? On what operating system?

Tested on:

Firefox 2.0.0.11 Mac OSX 10.5
Safari 3.0.4 Mac OSX 10.5
IE6 Windows XP (under Parallels)
IE7 Windows XP (under Parallels)

Please provide any additional information below.

Original issue reported on code.google.com by levi.nun...@gmail.com on 12 Dec 2007 at 5:22

GoogleCodeExporter commented 8 years ago
Hi

Could you tell what type of page you were using for the tests - JSP, ASP, PHP, 
HTML?

The Refresh issue reported works fine when the page is a HTML. However, the 
history 
cache gets cleared and reset if it is a JSP

Original comment by lans...@gmail.com on 13 Jan 2008 at 2:04

GoogleCodeExporter commented 8 years ago
I noticed the same problem under IE7. I'm using working ASP.NET. It seems that
"!historyStorage.hasKey(this.PAGELOADEDSTRING)" fails on a page refresh (which 
it
shouldn't). 

Any idea how I can preserve the history cache?

Original comment by oldgoo...@nolten.nu on 28 Jan 2008 at 12:11

GoogleCodeExporter commented 8 years ago
Server sends last-modified-date for static files like HTML and IE sends a
if-modified-since request when you click refresh button. Server responds with
not-modified and IE (correctly) assumes that nothing really changed. 
window.onload()
fires but "/*Else if this is a fake onload event*/" part gets executed and 
history
remains intact.

In case of JSP, server cannot send a meaningful last-modified-date (LMD), so in 
case
of refresh, IE sends request to server without if-modified-since header and 
server
responds with 200.
IE re-initializes all variables and library does not find this.PAGELOADEDSTRING 
in
historyStorage and thus history is lost.

Same behavior can be seen when you press shift-refresh(F5) for HTML file, which
makes IE to reload the page regardless of its last-modified-date.

Developers of this library can validate this and please suggest a solution.

Original comment by samee...@gmail.com on 5 Jul 2008 at 6:01