0

Why does the console give so many errors when i try to embed the google maps and can i fix it.

http://jsfiddle.net/EMDyq/2/

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.google.co.in/maps?sll=12.954170662980777,77.6309395&amp;sspn=0.45648029298930365,0.905093763534904&amp;t=m&amp;q=bangalore&amp;dg=opt&amp;ie=UTF8&amp;hq=&amp;hnear=Bangalore,+Bangalore+Urban,+Karnataka&amp;z=10&amp;ll=12.971599,77.594563&amp;output=embed"></iframe>

Here are the errors that i see in my console.

Invalid 'X-Frame-Options' header encountered when loading 'https://www.google.co.in/maps?sll=12.954170662980777,77.6309395&sspn=0.4564…alore,+Bangalore+Urban,+Karnataka&z=10&ll=12.971599,77.594563&output=embed': 'ALLOWALL' is not a recognized directive. The header will be ignored. about:blank:1
XHR finished loading: "https://www.google.co.in/maps/gen_204?imp=asl&jsv=461b&ei=Frv4UYjLO7GOiAfRzIHQDw". maps:2
2
Unsafe JavaScript attempt to access frame with URL http://jsfiddle.net/EMDyq/ from frame with URL https://www.google.co.in/maps?sll=12.954170662980777,77.6309395&sspn=0.4564…alore,+Bangalore+Urban,+Karnataka&z=10&ll=12.971599,77.594563&output=embed. The frame requesting access has a protocol of 'https', the frame being accessed has a protocol of 'http'. Protocols must match.
 %7Bmain,mod_util,mod_act,mod_act_s,mod_actbr,mod_appiw,mod_mg,mod_mssvt,mod_pphover,mod_rst,mod_stars,mod_strr%7D.js:1893
XHR finished loading: "https://www.google.co.in/maps/gen_204?imp=ael&jsv=461b&ei=Frv4UYjLO7GOiAfRzIHQDw". %7Bmain,mod_util,mod_act,mod_act_s,mod_actbr,mod_appiw,mod_mg,mod_mssvt,mod_pphover,mod_rst,mod_stars,mod_strr%7D.js:1615
Resource interpreted as Script but transferred with MIME type text/html: "https://www.google.co.in/maps/caching/public". %7Bmain,mod_util,mod_act,mod_act_s,mod_actbr,mod_appiw,mod_mg,mod_mssvt,mod_pphover,mod_rst,mod_stars,mod_strr%7D.js:716
Resource interpreted as Script but transferred with MIME type text/html: "https://www.google.co.in/maps/caching/private". %7Bmain,mod_util,mod_act,mod_act_s,mod_actbr,mod_appiw,mod_mg,mod_mssvt,mod_pphover,mod_rst,mod_stars,mod_strr%7D.js:716
Resource interpreted as Script but transferred with MIME type text/html: "https://www.google.co.in/maps/caching/public?q=123". %7Bmain,mod_util,mod_act,mod_act_s,mod_actbr,mod_appiw,mod_mg,mod_mssvt,mod_pphover,mod_rst,mod_stars,mod_strr%7D.js:716
aWebDeveloper
  • 36,687
  • 39
  • 170
  • 242

2 Answers2

0

Also, the HTTPS protocols must match. JSFiddle doesn't provide SSL.

Possibly a Google Bug: Chrome, three.js: Cross-origin image load denied

Community
  • 1
  • 1
detailCode
  • 537
  • 1
  • 8
  • 22
0

iframes and the main page have to match protocols ( Http:// and Https:// )

Error: Blocked a frame with origin "https://www.google.co.in" from accessing a frame with origin "http://jsfiddle.net". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.

NOTE: a secure site can not communicate with a not-secure site, yet you can use it.

Praveen
  • 55,303
  • 33
  • 133
  • 164
  • @WebDeveloper JSFiddle is not using SSH, hence it will still suffer the error. Is your site is secure(using `https`)? – Praveen Jul 31 '13 at 08:23
  • @WebDeveloper I got the above error (as I mentioned in my answer) check this image http://s17.postimg.org/9wtsyuqrz/image.png. you should check this [The X-Frame-Options response header](https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options) – Praveen Jul 31 '13 at 11:42