Enabling Google mobile in iframe does not work

Below is a link to Google mobile view: Google mobile site .

I tried putting it in an iframe on my website, but it does not work.

<iframe id="google_search" src="http://m.google.at/search?hl=de&safe=on&q=stackoverflow" style="width: 400px; height: 600px; overflow:scroll; border: 1px solid black;"></iframe> 

All I get is an emty iframe. Why?

+3
source share
1 answer

I suspect that Google is sending the X-FRAME-OPTIONS header to deny . This prevents the page from loading in a frame in IE8 + and later versions of FireFox, Opera, and Chrome (the exact version numbers are currently changing).

This is usually done to combat ClickJacking. IEBlog has a great article on this: IE8 Security Part VII: ClickJacking Protection

+4
source

Source: https://habr.com/ru/post/1442776/


All Articles