Side navigation
#10161 closed bug (cantfix)
Opened August 29, 2011 01:23PM UTC
Closed August 31, 2011 01:12AM UTC
Last modified August 31, 2011 07:51AM UTC
CSS modifications not reset on unload
Reported by: | dam@modsoftsys.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | event | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Consider http://jsfiddle.net/PDwpP/40/
To observe the issue, the Results iframe should be opened in a separate window. Only tried with Firefox 6.
After pressing the button, the 'Progress...' div is colored in red and the page is navigated away (in this example, to a non-existing URL). Pressing 'Back' returns to the original page and the div is still red (bad behaviour).
Try changing the version (in the HTML part) to 1.3.2, update and repeat the above steps. After pressing 'Back' the div is black (wanted behaviour).
The problem is present in any version after 1.3.2. After bisecting, it appears that the commit that introduces the problem is f3474c00cd6d9e5fd61b6ef1562003e9986ad67d
Attachments (0)
Change History (6)
Changed August 29, 2011 01:37PM UTC by comment:1
component: | unfiled → event |
---|---|
priority: | undecided → low |
status: | new → open |
Changed August 29, 2011 01:37PM UTC by comment:2
version: | 1.4 → 1.6.2 |
---|
Changed August 29, 2011 03:14PM UTC by comment:3
It's not likely to be a jQuery bug, since it happens without jQuery being included:
Changed August 30, 2011 06:06AM UTC by comment:4
Replying to [comment:3 dmethvin]:
It's not likely to be a jQuery bug, since it happens without jQuery being included: http://jsfiddle.net/dmethvin/PDwpP/42/
Confirmed with Firefox 6.
Still, jQuery 1.3.2 seems to have worked around this. The workaround seems like a side effect of something else, but maybe still a good idea?
The use case I am fighting with is a page overlay that is shown upon form submit, covering the whole window as an indication that the request is being processed. Still showing that when pressing 'Back' is a major pain.
Changed August 31, 2011 01:12AM UTC by comment:5
resolution: | → cantfix |
---|---|
status: | open → closed |
Given your bisect result I am pretty sure this is a result of the Firefox bfcache feature. In 1.3.2 we attached to the unload
event in all browsers which defeated the bfcache; that was fixed in 1.4 and we only attached to unload
in IE to handle some memory leak issues.
So yes, jQuery used to defeat the bfcache which fixed this particular issue but destroyed performance for the other 95% of the time. So it isn't something we'd reinstate.
Google around for ways to defeat bfcache, for example you could bind to the pageshow
event to undo the red text.
Changed August 31, 2011 07:51AM UTC by comment:6
Thank you very much.
Indeed, binding to pageshow (instead of unload) works without breaking caching, which makes Back button work instantly and also without losing any other dynamic changes in the page (as long as the cache is hot, but there is the ready event for when the cache has expired anyway).
Thanks again!
Confirmed http://jsfiddle.net/timmywil/PDwpP/41/