4 ms·
The browser enforces it, not the website. You can't use in-browser JavaScript to load a page from a site other than the one you downloaded the JavaScript from.
by semanticist 16y ago
The browser enforces it, not the website. You can't use in-browser JavaScript to load a page from a site other than the one you downloaded the JavaScript from.
Otherwise any site you visited could load gmail in the background and read all your email.
It's inconvenient when you're making client-side applications, but for the web to have any kind of security it's absolutely essential.
- lelele 16y agoThank you for your explanation. I've tried it. I'm a system programmer, not a web developer, and it shows ;-)