[openstreetmap-website] Make the persistent permalink URL update less frequently (#506)

Eugene Alvin Villar notifications at github.com
Sun Oct 6 03:22:44 UTC 2013


This is in relation to the concerns I've raised in #378.

Right now, each and every single click-drag (pan) and mouse-wheel scroll (zoom) updates the URL hash. I don't think we need to update that much. When people are browsing around the map, they usually pan and zoom around quite a bit before settling into a particular map view. I'm quite sure that those intermediate views are never going to be bookmarked or passed around as links.

I suggest that instead of updating the URL hash every time, fire a JS setTimeout such that if there's no map movement when the timeout period expires, then we can be certain that the user is interested in that particular view and so the URL hash should be updated. This should mitigate the browser history pollution problem.

As for the timeout period, I think 2 seconds seems a reasonable value. It would certainly take more time than that for the user to decide that the current map view is OK for his/her needs before clicking on the location bar to select the URL to copy it.


---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/506
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20131005/2e85dcca/attachment.html>


More information about the rails-dev mailing list