You are viewing a single thread.
View all comments View context
13 points

I stand by that iframes had their place, even if the backend devs absolutely hated them.

permalink
report
parent
reply

Running each app component in it’s own iframe is perfectly valid microservices architecture change my mind.

permalink
report
parent
reply
3 points

Technically correct.

permalink
report
parent
reply
13 points

They still have their place; for example to embed Google Maps or a YouTube video. Generally, whenever you want to embed something from a different website you have no control over, that shouldn’t inherit your style sheets, and should be sandboxed to prevent cross site scripting attacks.

permalink
report
parent
reply
3 points

Are iframes really sandboxed in different processes than the main frame? On which browsers?

permalink
report
parent
reply
12 points
*

Iframes cannot access the main frame’s DOM if the iframe is from a different origin than the main frame, and they never share the same JavaScript execution context, so an iframe can’t access the main frame’s variables etc.

It’s not required that iframes run in a different process, but I think they do at least in Chrome and Firefox if they’re from a different origin. Also, iframes with the sandbox attribute have a number of additional restrictions, which can be individually disabled when needed.

permalink
report
parent
reply
4 points

Seems to me they were mostly used to put content inside a scrollable element. Their place has mostly been taken by overflow:auto hasn’t it? I think this is the better way.

permalink
report
parent
reply
2 points

I believe Kingdom of Loathing used iframes extensively to achieve what looked like a “dynamic” page long before that was a thing.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3.4K

    Monthly active users

  • 1K

    Posts

  • 37K

    Comments