emoji-url-game icon indicating copy to clipboard operation
emoji-url-game copied to clipboard

Flooded browser history

Open gwillz opened this issue 5 years ago • 3 comments

Hey, great job - this is pretty neat. I probably spent a bit too long playing it...

If you use history.replaceState(null, "", display.join("")) instead of location.hash = ... you can avoid polluting the user's browser history.

Dunno if it has any performance penalties. Worth a shot.

gwillz avatar Oct 26 '19 07:10 gwillz

I actually tried to use the History API here, but it's throttled on 70% of browsers..
Thanks for the feedback still !

arnaudsm avatar Oct 26 '19 12:10 arnaudsm

@arnaudsm did you try to use location.replace()? I did a quick test and it appears to yield the same result as using location.hash.

TitanNano avatar Oct 27 '19 18:10 TitanNano

@arnaudsm did you try to use location.replace()? I did a quick test and it appears to yield the same result as using location.hash.

That's a good idea ! However the server needs to be able to respond to new URLs. That might be possible with some .htaccess magic.

arnaudsm avatar Oct 28 '19 00:10 arnaudsm