tags:

views:

29

answers:

1

Is there a way so that pages in <iframe> tags can't use javascript?

I mean, turn off javascript on iframes only but not on the browser.

A: 

No. You can't change anything in an iframe, unless it is in the same domain as the page containing it for security purposes.

The only way around this would be have your server act as a proxy and filter JS server-side.

NullUserException
so does this mean that if I want to disable javascript on an iframe, the browser should go also being javascript disabled?
Reigel
@Reigel Yes. AFAIK no major browser has a feature like that (disabling JS in iframes only)
NullUserException
@Reigel: pretty much, unless the content of the iframe is from the same web site (domain name). However, if you describe more about your problem, we might come up with another way to accomplish your goal.
Mark Eirich