viresh-ratnakar / exolve

Online interactive crossword software in JavaScript
MIT License
71 stars 15 forks source link

After a state sharing link is opened, could Exolve drop the appended data from the current URL? #63

Closed Antagony1060 closed 3 years ago

Antagony1060 commented 3 years ago

I often use the state link to transfer solving from one device to another. When the second device is my laptop I generally open the link then ‘pop’ it out into a new small window. But of course local storage has already been updated by then, so the new window issues an override prompt – even though the saved state and the URL state are essentially the same.

I've found that deleting the data part from the URL before opening the new window avoids the prompt, so that's got me wondering whether it's something that even needs to be kept? In other words, could Exolve remove the data immediately after a state sharing link is opened? Or is there a good reason – which I'm unaware of – for keeping it in place?

viresh-ratnakar commented 3 years ago

There wasn't a good reason any more. Back in the day, state was kept, displayed, and continuously updated in the URL too.

With v1.08 that I just checked in, the state data is now removed from the URL after it has been extracted.

Antagony1060 commented 3 years ago

Excellent work, thank you!

I never reported it, but I occasionally used to get an nginx 502 error in the browser if/when the number of saved cookies for my personal domain rose too high. I found the best way to clear it was to just delete the cookies for completed puzzles. Thankfully, the new local storage method has eliminated that issue.