You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose adding an attribute to iframes such as isolatehistory to support isolating their history apart from the browser's history, so they can maintain their own history and not add entries to the browser's history.
As its stands now, there appears to be no viable workaround for this, so if you use an iframed experience—CodePen is one example among thousands like it—or anything like that which does history routing, you'll have to click the browser's back button repeatedly to get out of the page since the iframe polluted the history.
<iframeisolatehistorysrc="..."></iframe>
iframes using isolatehistory would also need their own instance of the History API so they can manage their history effectively with the same API, but apart from the containing/parent window.
Full explainer
Problem
Currently, when using iframes for experiences such as codepen or other history routing, the iframe adds entries to the browser's history. This can cause confusion and inconvenience for users, as they are forced to repeatedly click the browser's back button in order to exit the page.
Research
Upon researching potential workarounds for this issue, it was found that there does not appear to be a truly effective solution. Attempts to use JavaScript to manipulate the browser's history or prevent the iframe from adding entries to the history have proven to be unreliable and inconsistent.
Solution
In order to truly solve this problem, I propose the addition of an isolatehistory attribute to iframes. This attribute would allow for the iframe to maintain its own history, separate from the browser's history. This would eliminate the problem of confusing and inconvenient history entries, and provide a more seamless user experience.
<iframeisolatehistorysrc="..."></iframe>
iframes using isolatehistory would also need their own instance of the History API so they can manage their history effectively with the same API, but apart from the containing/parent window.
Conclusion
The addition of an isolatehistory attribute to iframes would greatly improve the user experience and eliminate confusion and inconvenience caused by iframe history entries being polluted into the containing/parent window's history. It is a simple and effective solution that would greatly benefit those who use iframes for embedded experiences with their own navigation or routing making use of the History API.
As this change is linked to a specific attribute and would not change anything by default when the attribute is omitted, there are no breaking changes.
The text was updated successfully, but these errors were encountered:
TL;DR
I propose adding an attribute to iframes such as
isolatehistory
to support isolating their history apart from the browser's history, so they can maintain their own history and not add entries to the browser's history.As its stands now, there appears to be no viable workaround for this, so if you use an iframed experience—CodePen is one example among thousands like it—or anything like that which does history routing, you'll have to click the browser's back button repeatedly to get out of the page since the iframe polluted the history.
iframes using
isolatehistory
would also need their own instance of the History API so they can manage their history effectively with the same API, but apart from the containing/parent window.Full explainer
Problem
Currently, when using iframes for experiences such as codepen or other history routing, the iframe adds entries to the browser's history. This can cause confusion and inconvenience for users, as they are forced to repeatedly click the browser's back button in order to exit the page.
Research
Upon researching potential workarounds for this issue, it was found that there does not appear to be a truly effective solution. Attempts to use JavaScript to manipulate the browser's history or prevent the iframe from adding entries to the history have proven to be unreliable and inconsistent.
Solution
In order to truly solve this problem, I propose the addition of an
isolatehistory
attribute to iframes. This attribute would allow for the iframe to maintain its own history, separate from the browser's history. This would eliminate the problem of confusing and inconvenient history entries, and provide a more seamless user experience.iframes using
isolatehistory
would also need their own instance of the History API so they can manage their history effectively with the same API, but apart from the containing/parent window.Conclusion
The addition of an
isolatehistory
attribute to iframes would greatly improve the user experience and eliminate confusion and inconvenience caused by iframe history entries being polluted into the containing/parent window's history. It is a simple and effective solution that would greatly benefit those who use iframes for embedded experiences with their own navigation or routing making use of the History API.As this change is linked to a specific attribute and would not change anything by default when the attribute is omitted, there are no breaking changes.
The text was updated successfully, but these errors were encountered: