5 ms·
I'm not sure what you mean, are you referring to iframes perhaps? I mean framesets.[0] The top arguments here[1] are: > 1) Frames prevent users from properly
by 6510 2y ago
I'm not sure what you mean, are you referring to iframes perhaps? I mean framesets.[0]
The top arguments here[1] are:
> 1) Frames prevent users from properly bookmarking pages.
Not true anymore since we have History.pushState() and History.replaceState()
> 2) Frames present challenges for printing web pages.
This is just funny in 2024.
> 3) Users coming from search engines may not have access to navigational elements if they are located in another frame — they are directed to only that frame the search engine found the text in.
The top page is actually so simple that if pages that should be framed are loaded on their own they can can just act like a frameset and load themselves into one of the frames[2] (or redirect to the frame set)
if(window.self == window.top){
frameset = document.createElement('frameset');
frameset.setAttribute('cols', '50%, 50%');
frameset.innerHTML = `
<frame src="https://example.com" />
<frame src="https://example.com" />`;
document.body.replaceWith(frameset);
}
[0] - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/frameset https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fr...
[1] - https://stackoverflow.com/questions/4263509/why-are-frames-deprecated-in-html https://stackoverflow.com/questions/4263509/why-are-frames-d...
[2] - https://jsfiddle.net/2ahc0orm/ https://jsfiddle.net/2ahc0orm/