1

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?

Community
  • 1
  • 1
DevEX
  • 11
  • 1
  • 4

2 Answers2

3

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.

mehulmpt
  • 15,861
  • 12
  • 48
  • 88
0

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

Abdulbasit
  • 534
  • 8
  • 13