0

I am trying to embed Stack OverFlow website into a html page using iFrame, but I am unable to do that. I have tried to embed my other two websites and those are displaying correctly and this one is not getting displayed in my page.

The iFrame i used in the code:

 <iframe src="https://stackoverflow.com/questions/20199126/reading-json-from-a-file" style="height: 300px; width: 100%;"></iframe>

And the error is

 Refused to display 'https://www.stackoverflow.com/' in a frame because it set 'X-Frame-Options' to 'deny'. 

Please tell me is there any method to access the Stack OverFlow.

Thanks in advance

Android Geek
  • 573
  • 1
  • 4
  • 7

1 Answers1

0

The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object>. Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites.

The added security is only provided if the user accessing the document is using a browser supporting X-Frame-Options.

Rob Moll
  • 3,345
  • 2
  • 9
  • 15