From 19c77c3d24e31d1e5d44616ca25c02ee97ed27bd Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 11 Dec 2013 00:19:49 +0000 Subject: [PATCH] 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 --- app/assets/javascripts/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index d07c9797d..a300cc280 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -150,7 +150,8 @@ $(document).ready(function () { map.getLayersCode(), 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') { -- 2.39.5