From f5fa16c24f4bdf4b5b60072e4651eaa55fc3d635 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 1 Jun 2009 13:54:44 +0000 Subject: [PATCH] Give location cookie a 10 year expiry. --- app/views/site/index.rhtml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 53a4c9a07..37004e25b 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -170,10 +170,12 @@ end var zoom = map.getZoom(); var layers = getMapLayers(); var extents = getMapExtent(); + var expiry = new Date(); updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents.left, extents.bottom, extents.right, extents.top); - - document.cookie = "_osm_location=" + lonlat.lon + "|" + lonlat.lat + "|" + zoom + "|" + layers; + + expiry.setYear(expiry.getFullYear() + 10); + document.cookie = "_osm_location=" + lonlat.lon + "|" + lonlat.lat + "|" + zoom + "|" + layers + "; expires=" + expiry.toGMTString(); } function resizeContent() { -- 2.43.2