3 ms·
pushState is bad for many use cases because it completely breaks linking.
by blattimwind 8y ago
pushState is bad for many use cases because it completely breaks linking.
- roywiggins 8y agoIt doesn't have to, if you also provide routes on the backend so that pushState URLs actually resolve to a real URL that serves the same content. Or just provide a wildcard route and use JS to detect the URL like you would with hash-based navigation. It does require more coordination between the front and back-end though.
- blattimwind 8y agoI meant using pushState using the state object for something other than caching. If I click on "About us" and this results in pushState({page:"about-us"}, "", "#") then linking just doesn't work any more. It's a regression back to the days of Flash.
- roywiggins 8y agoAh, gotcha. Yes, that's a truly awful way to use it.