Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Why do people still use iframes?
Asked 11 years, 1 month ago. Active 1 month ago. Viewed 87k times. I agree with Moshe above. The only other use of Iframes is for: ancient web clients that do not support modern CSS or in some proprietary environment.
Add a comment. Active Oldest Votes. I can think of 2 reasons at the moment why people would still use iframes instead of AJAX: 1 Iframes circumvent the cross domain origin policy images, scripts, and styles do not. Re 3, Gmail can be rewritten without iframes. So why do people still use iframes for modern browsers? The question is left unanswered.
Their use is declining. This is lot simpler, and good example of ads : — oneworld. Right; even so, changing what the iframe points to using JS typically requires one line, as opposed to the greater complexity of XMLHttpRequest. I use them on ajax websites, when I need to upload files without reloading the page. Kris van der Mast. The point's that it's 2 different applications, usually even 2 completely different technologies.
The one handles the authentication and the other grabs the injected headers for the authentication ticket or building it up when needed. Many Formatted Text Editors e. Lie Ryan. The Overflow Blog. Does ES6 make JavaScript frameworks obsolete? Cross-origin communication can be achieved using Window. The title's value should concisely describe the embedded content:. Note: When the embedded document has the same origin as the embedding page, it is strongly discouraged to use both allow-scripts and allow-same-origin , as that lets the embedded document remove the sandbox attribute — making it no more secure than not using the sandbox attribute at all.
Sandboxing is useless if the attacker can display content outside a sandboxed iframe — such as if the viewer opens the frame in a new tab. Such content should be also served from a separate origin to limit potential damage. The sandbox attribute is unsupported in Internet Explorer 9 and earlier. Privacy, permissions, and information security.
Flow content , phrasing content , embedded content, interactive content, palpable content. No corresponding role. This attribute controls the appearance of the scrollbars that appear on the frame. This takes values either "yes", "no" or "auto".
This attribute allows you to provide a link to another page containing a long description of the contents of the frame. Previous Page. Next Page. Live Demo.
0コメント