1

The goal is to have two independent google maps each in a jQuery Tab. This will be included in a IFrame. When bounds_changed is triggered the lat/lng and zoom should be stored in a cookie. If there is a cookie available then the map should be positioned and zoomed regarding on the data of the cookie.

It seems to work with the common browsers except an actual Internet Explorer. IE does not "refresh" the map on the second tab.

Here's the JSFiddle with the "inner" stuff: http://jsfiddle.net/metaxos/AmVtf/5/

Here's the JSFiddle with the IFrame: http://jsfiddle.net/metaxos/x6SxB/3/

<iframe width="600px" height="600px" src="http://jsfiddle.net/metaxos/AmVtf/5/embedded/result/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
metaxos
  • 151
  • 1
  • 16

1 Answers1

0

Now this was an odd one. Been playing with it and can replicate your issue in ie10, and everything seems perfectly fine.

Just stumbled across this question however: https://stackoverflow.com/a/15930571/1856970 and it seems it's a bug with ie that stops cookies being set if you have an underscore in your machine name.... Very odd.

Try testing on another machine if you have one available.

Also see this which may be relevant:

Q7: My site is not receiving cookies when it is running in an IFRAME and the parent page is from a different domain. Why?

A: Internet Explorer has restrictions on “3rd party” cookies. 3rd party cookies are cookies which are set or sent for resources from a different domain than the top-level browsing context. You can easily confirm P3P/Cookie restrictions as the root cause of such issues by temporarily changing IE’s Tools / Options / Privacy setting to “Accept All Cookies”.

In order to allow such cookies to be sent reliably, you should send a P3P header when setting the cookie.

You can use Fiddler’s “Privacy Inspector” to view and analyze any P3P Policy. To learn more about P3P and IE, see my quick P3P guide.

Changing my privacy settings as advised above allows this to work with the iFrame version.

Community
  • 1
  • 1
ChrisSwires
  • 2,713
  • 1
  • 15
  • 28
  • sorry just to be sure i understand. Does it work as expected on your ie10? And which machine name should not have any underscore? – metaxos Feb 21 '14 at 16:10
  • It doesn't work on mine because my machine name has an underscore in it, and it's the clients machine I believe (which in the case of dev is obviously the servers as well in localhost cases). – ChrisSwires Feb 21 '14 at 16:13
  • and did the cookie was written without the iFrame (http://jsfiddle.net/metaxos/AmVtf/5/)? The strange thing is, that the cookie is written correctly on my machine but still the map is not displayed as needed. – metaxos Feb 21 '14 at 16:16
  • Neither cookie works on mine (with or without iFrame). If the cookie is written on yours then unfortunately I can't be of much help as I can't replicate. – ChrisSwires Feb 21 '14 at 16:17
  • do you have another browser to crosscheck? My colleague has also no underscore in his machinename but the cookie seems not to be written... – metaxos Feb 21 '14 at 16:20
  • It works perfectly in chrome, safari and FF, but cookies are not set in ie for either fiddle. – ChrisSwires Feb 21 '14 at 16:25
  • so then there is no way to set cookies in IE if some machine name (clients one) would have a underscore on it? What could be a workaround for this? – metaxos Feb 21 '14 at 16:29
  • See update, it seems there's also an issue with 3rd party cokkies which may solve the problem. This will howvever again depend on client set-up so it's perhaps best to find an alternative to cookies. – ChrisSwires Feb 21 '14 at 16:38