D
D
Denis Ilinykh2011-09-02 10:58:32
JavaScript
Denis Ilinykh, 2011-09-02 10:58:32

How to disable javascript in iframe?

There is an iframe in it, pages are loaded, some of them do not like when they are loaded in a frame and want to show how cool they are in all their glory) and redirect to themselves in the parent window. How can I teach them to do such dirty tricks).

I saw the sandbox attribute but it only works in chrome, also an addition to FF NoScript, but turn it off here and there) a lot of trouble.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ilya Plotnikov, 2011-09-02
@ilyaplot

Try security=”restricted”
msdn.microsoft.com/en-us/library/ms534622 (v=vs.85).aspx
I'm not sure if that would help though.

T
ttas, 2011-09-05
@ttas

The idea to trick your iframe immediately came to mind. If it accesses the parent window via window.parent, then wrap the iframe in another iframe. And then the page in "all its glory" will jump from the nested iframe to the parent iframe.

D
Denis Karimov, 2017-07-31
@trixden

htmlbook.ru/html/iframe/sandbox The
sandbox attribute helps here. The main thing is not to enter into the 'allow-top-navigation' value. In my position it works in all browsers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question