]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/index.rhtml
fixed fatal error as a result of copy/paste programming
[rails.git] / app / views / site / index.rhtml
index 53a4c9a07800aa27e44576fa278c46532942a4de..37004e25bdbf872c91259622b53c5c6036164f41 100644 (file)
@@ -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() {