Mobile app version of vmapp.org
Login or Join
Eichhorn148

: Internet Explorer iframe JavaScript access denied I have a webpage on domain www.example.com that has an <iframe> with a page test.html from sub.example2.com. test.html includes a JavaScript

@Eichhorn148

Posted in: #Iframe #InternetExplorer9 #Javascript

I have a webpage on domain example.com that has an <iframe> with a page test.html from sub.example2.com. test.html includes a JavaScript from another domain:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>


When I open example.com then I get an access denied error for that JavaScript.

What's the reason for that?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Eichhorn148

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kristi941

This is due to the "Same Origin" security policy.


The “Same Origin” policy limits the access of one window to another.

The reason behind that is security. If you have blabla.com in one
window and gmail.com in another one, then you’d not want a script from
blabla.com to access or modify your mail or run actions in context of
gmail on your behalf.

The essence of the Same Origin policy can be formulated as: windows
can work in contexts of each other only if they are from same
protocol://domain:port, or, shortly, from same origin.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme