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() {