0

I have the following code:

<html>
<body style="margin: 0px; height: 100vh;">
<iframe src="https://example.org" style="border: none; width: 100%; height: 100%; margin: 0px;"/>
</body>
</html>

Let's say "example.org" has requests being made from badsite.org. How can I block requests of badsite.org in my iFrame without the need of an adblocker chrome extension?

I currently tried nothing

  • I suggest you have a look at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options and https://stackoverflow.com/questions/19843085/how-to-block-website-from-loading-in-iframe – Joachim Mar 19 '23 at 18:25
  • Does this answer your question? [how to block website from loading in iframe?](https://stackoverflow.com/questions/19843085/how-to-block-website-from-loading-in-iframe) – Joachim Mar 19 '23 at 18:25

0 Answers0