DevEX
DevEX

Reputation: 11

Remove POP up in Iframe

When I put an Iframe in my website (contain video) when someone click on the Iframe that contain video a pop up ads show. How I can disable that or remove it and get a clean Iframe without pop up ads I have already try this How to block pop-up coming from iframe?

Upvotes: 1

Views: 7401

Answers (2)

Abdulbasit
Abdulbasit

Reputation: 790

Adding this attribute to your iframe should work just fine "sandbox="allow-scripts allow-forms allow-same-origin"

Upvotes: 0

mehulmpt
mehulmpt

Reputation: 16597

You can sandbox your iframe:

<iframe src="pageURL" sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts allow-top-navigation"></iframe>

This does not include allow-popups which'll block popups.

Upvotes: 3

Related Questions