this post was submitted on 28 Jul 2023
924 points (96.3% liked)
Programmer Humor
19488 readers
1201 users here now
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
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Are iframes really sandboxed in different processes than the main frame? On which browsers?
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.