Issue all _osm_location cookies against the root path

To ensure that any old cookies issued against other paths are
removed we make sure to do a removeCookie call first without a
path being specified so that any cookie for the current page is
removed before we add a new one against the root.

Fixes #652
This commit is contained in:
Tom Hughes 2013-12-11 00:19:49 +00:00
parent 54608122bb
commit 19c77c3d24

View file

@ -150,7 +150,8 @@ $(document).ready(function () {
map.getLayersCode(), map.getLayersCode(),
map._object); map._object);
$.cookie("_osm_location", cookieContent(map), { expires: expiry }); $.removeCookie("_osm_location");
$.cookie("_osm_location", cookieContent(map), { expires: expiry, path: "/" });
}); });
if ($.cookie('_osm_welcome') == 'hide') { if ($.cookie('_osm_welcome') == 'hide') {