5 ms·
I think he means it the other way around. You have a Single page application with routing based on #someRoute, then someone tries to share some link with the #t
by rolae 8y ago
I think he means it the other way around. You have a Single page application with routing based on #someRoute, then someone tries to share some link with the #targetText=... which will lead to an invalid route. Or am I missunderstanding something?
- prepend 8y agoYou’re thinking of ?targetText= or &targetText= Hash isn’t used for query parameters.
- aepiepaey 8y agoNot for query parameters sent to the remote server, but there are definitely pages/applications that store state in the hash. For example, look at the URLs used by mega.nz, or any encrypted pastebin (they store the decryption key in the hash so it's not sent to the server).
- bryanrasmussen 8y agolots of older or poorly written SPAs use the hash exactly in this way. I guess their fault for being poorly written, like those people who allowed GET requests to /deleteaccount based on the theory that you had to be logged in with a browser for it to ever happen and not considering that google would make an extension that did all get requests on a page on entry.
- coldtea 8y agoThey didn't use it because they were "poorly written", it was a "state of the art" technique back in the day. Gmail used, others used it. https://stackoverflow.com/questions/15238391/hash-params-vs-url-params-when-to-use-which https://stackoverflow.com/questions/15238391/hash-params-vs-...
- bryanrasmussen 8y agosure, it was state of the art back in the day, but state of the art over time depreciates to technical debt, and the ones that are left using what was once state of the art are now poorly written.
- coldtea 8y ago>and the ones that are left using what was once state of the art are now poorly written. They could just be perfectly written (for their time), just legacy and not updated, is my distinction.
- bryanrasmussen 8y agoat some point the accretion of legacy and not fixing issues to match better understanding turns a perfectly written for its time application into a poorly written application for the present.
- threeseed 8y agoThat doesn't give Google the right to break all those sites though.
- bryanrasmussen 8y agoright, I guess I should have indicated sarcasm on the I guess it's their fault part.
- Shish2k 8y agoIt is in client-side JS single-page-apps...
- coldtea 8y agoIt was used in SPAs. It was a common technique in the mid-2000s up to 2010 or so. But not for query parameters per se, for app state stored in the query string (and bookmarkable). https://stackoverflow.com/questions/15238391/hash-params-vs-url-params-when-to-use-which https://stackoverflow.com/questions/15238391/hash-params-vs-...
- Guest10928391 8y agoOne that quickly comes to mind... https://store.steampowered.com/tags/en/Adventure/#p=3&tab=TopSellers https://store.steampowered.com/tags/en/Adventure/#p=3&tab=To...
- supermatt 8y agodoesnt seem to break on addition of a targetText "hash-param"
- palerdot 8y agoBackbone JS uses hash for routing. Case in point - http://backbonejs.org/#Router http://backbonejs.org/#Router. There should be lot of sites that uses hash params as routes which still exists from the early SPA era.