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?
Asked
Active
Viewed 6,882 times
1
-
Hello, Have you found a way around this question? I am facing the same issue today and I need an answer – Master Of Disaster Nov 22 '22 at 11:04
2 Answers
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