Re:Htmx and URL State Management
by NegativeLatency on Tuesday July 29, 2025 @08:00PM
(#44729635)
I've seem a largish company everyone here knows of, try this and have it fail, because of various weird client things, and also eventually run out of space in the hash. It's a neat hack but I wouldn't rely on it.
Oh boy, hashbangs are back.
The first one that comes to mind was twitter...
Re:Htmx and URL State Management
by mediumsmart on Wednesday July 30, 2025 @01:53AM
(#44731206)
I think LinkedIn won the stuffedURLbufferOverflow Olympics back in the day.
Re:Htmx and URL State Management
by ashwinsundar on Wednesday July 30, 2025 @01:52AM
(#44731203)
They failed as a company?
Re:Htmx and URL State Management
by NegativeLatency on Wednesday July 30, 2025 @08:35PM
(#44741155)
Still around doing, eh fine. But they abandoned the url hash params with an id that references params on the backend (a mess!)
When people start using or buying your software you are going to quickly find out that 64K won't work
Re:Htmx and URL State Management
by actionfromafar on Wednesday July 30, 2025 @03:38AM
(#44731749)
640K oughta be enough for everyone.
For parameters the server does need to see, remember that params need not be &-separated kv pairs, it can be arbitrary text. Keys can usually be eliminated and just hard-coded in the web page; this may make short params longer but likely makes long ones shorter.
You absolutely should not restore state based on LocalStorage; that breaks the whole advantage of doing this properly! If I wanted previous state, I would've navigated my history thereto. I hope this isn't as bad as sites that break with multiple open tabs at least ...