Give location cookie a 10 year expiry.
This commit is contained in:
parent
0a334787f1
commit
f5fa16c24f
1 changed files with 4 additions and 2 deletions
|
@ -170,10 +170,12 @@ end
|
||||||
var zoom = map.getZoom();
|
var zoom = map.getZoom();
|
||||||
var layers = getMapLayers();
|
var layers = getMapLayers();
|
||||||
var extents = getMapExtent();
|
var extents = getMapExtent();
|
||||||
|
var expiry = new Date();
|
||||||
|
|
||||||
updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents.left, extents.bottom, extents.right, extents.top);
|
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() {
|
function resizeContent() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue