4
votes

I am trying to load url in iframe.I am getting the error Refused to display in a frame because it set 'X-Frame-Options' to 'DENY'.Can anybody tell how to overcome this error

Thanks

2
Do you have access to the URL you are trying to load?glosrob
You can't. That's what the X-Frame-Options header is for: it allows website owners to prevent others framing their site.Daniel Beck

2 Answers

2
votes

You can't, not for just any URL, however, if you own/can get in contact with the owner of the site, then you/they can allow your site to display the theirs in an <iframe>:

The X-Frame-Options response header

-3
votes

I disabled my antivirus. And it worked.