mars-2026 / mars26_com

Open-source, high-resolution Mars explorer built using ArcGIS and React.
https://mars26.com
34 stars 3 forks source link

Each link with coordinates gets saved to browser history #1

Closed deepspacerace closed 3 years ago

deepspacerace commented 3 years ago

Right now, browser history fills up, because as the user moves around the globe, every #heading= link gets saved.

Possible solution is to only parse links with coordinates on dedicated share button.

Feedback from https://news.ycombinator.com/item?id=26966214

ceritium commented 3 years ago

I suggest use history API like in https://github.com/mars-2026/mars26_com/pull/3. Trigger replaceState() for the quick changes and scrolls, then based on a timeout pushState() when no more movements are detected in a period of time.

This will allow keep the "history" functionality (which I really like) without pollute this history.

My two cents 😄

spacemorty commented 3 years ago

I suggest use history API like in #3. Trigger replaceState() for the quick changes and scrolls, then based on a timeout pushState() when no more movements are detected in a period of time.

This will allow keep the "history" functionality (which I really like) without pollute this history.

My two cents 😄

Thanks for these valuable two cents :) I opened a separate issue for this and we will implement this soon ! https://github.com/mars-2026/mars26_com/issues/6