Answer the question
In order to leave comments, you need to log in
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
Try security=”restricted”
msdn.microsoft.com/en-us/library/ms534622 (v=vs.85).aspx
I'm not sure if that would help though.
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.
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 questionAsk a Question
731 491 924 answers to any question