If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

delayed loading of iframe adds an extra entry in the session history

NEW
Unassigned

Status

()

Core
Document Navigation
12 years ago
5 years ago

People

(Reporter: Jungshik Shin, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
When a page has an iframe whose src attribute is 'about:blank' at the beginning and later relocated to something else with 'location.href' in javascript, an extra entry is added to the session history. Therefore, 'back' button needs to be pressed twice to go back to the previous page. Opera has exactly the same bug. 

This bug is similar to bug 237717 and bug 235398. However, the test cases for thoese two bugs works fine now while at http://www.ohmynews.com (they seem very fond of this kind of technique....), I always have to press back button twice. 

I'm gonna upload a simple test case.
(Reporter)

Comment 1

12 years ago
Created attachment 206489 [details]
test case 

This is a reduced test case. 

1. Load the page and wait for 4 seconds
2. An ad will be shown
3. Press the back button. Only the ad will disappear
4. Press the back button once more and you'll be back to the previous page.

Comment 2

12 years ago
Why is this a bug?

Or, what special rules do you think should be applied to subvert this behavior? Using hidden iframes for AJAX navigation is a common technique and it seems like it would be easy to break this use with a special about:blank rule.
(Reporter)

Comment 3

12 years ago
(In reply to comment #2)
> Why is this a bug?

It may not be a bug from developers' point of view, but it's an annoying 'bug' from users' point of view because it takes 2 back-buttons to roll back what they perceive as a single page (my test case is not so good. It's better to go to http://www.ohmynews.com , 'read' any article, wait for 4 seconds  and press the back button.). Well, I admit what users perceive as a single page is a fuzzy concept with AJAX navigation...

> Or, what special rules do you think should be applied to subvert this behavior?
> Using hidden iframes for AJAX navigation is a common technique and it seems
> like it would be easy to break this use with a special about:blank rule.

It's for sure very tricky.  Somehow MSIE doesn't 'suffer' from this 'problem' (otherwise, ohmynews.com wouldn't have used it in the first place in Korea where MSIE has well over 99% share.). Neither does Safari (2.02 on Mac OS 10.4.3)

Do you think we'd better make this an 'evangelism' issue? It's an option but wouldn't be so easy to persuade them because there's no downright 'violation' of any standard.321084
This looks very similar to bug 237717 -- there the iframe had no src at all, though.  I don't think that src="about:blank" should mean the same thing as no src, so I'd say this is wontfix, even if IE does treat them identically...

The reason I don't think they should mean the same thing is that if we load "x" in an iframe, then load "about:blank", and then load "y", I would expect us to be able to go back twice from "y".  If we just do a replace load on top of about:blank, that won't work.  I don't really feel like reverse-engineering all of IE's iframe session history handling here, unless we're actually doing a full redesign of session history (which I think we should do, in fact).
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → WONTFIX
(Reporter)

Comment 5

12 years ago
I asked the web master of the site to get rid of 'about:blank' (actually, 'src' attribute was removed entirely), but it didn't help. Seems like this is a dupe of bug 148794. 
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
(Reporter)

Comment 6

12 years ago
Btw, I also tried 'src=""', but that didn't help either. As for the site, I'll ask the webmaster to go back to what they did before (see bug 235398) with a delay if they want.


*** This bug has been marked as a duplicate of 148794 ***
Status: REOPENED → RESOLVED
Last Resolved: 12 years ago12 years ago
Resolution: --- → DUPLICATE
"" refers to the page itself
Per comment 0 the page is setting location.href, not using document.write, no?  Certainly the testcase doesn't use document.write.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
I bet the real issue with no src set is the frame loader loading about:blank if there is no src on an iframe that's inserted into the document.  In any case, if we're going to do something wacky and special here we need a clear spec.
Assignee: bzbarsky → nobody
Status: REOPENED → NEW

Updated

9 years ago
Component: History: Session → Document Navigation
QA Contact: history.session → docshell

Updated

7 years ago
Duplicate of this bug: 598275
Duplicate of this bug: 787381
You need to log in before you can comment on or make changes to this bug.