7 ms·
I got 423 :) The navigations between #0 and #1 are instant all right. Are they just being used because it's a static site that can't have a catch-all route?
by benatkin 4y ago
I got 423 :)
The navigations between #0 and #1 are instant all right. Are they just being used because it's a static site that can't have a catch-all route?
- chrisco255 3y agoIt might be to force a refresh of the favicon? Never tried rendering 10 frames per second to it, but have definitely seen cached icons when devving locally.
- benatkin 3y agoThat part is clear to me. What isn't clear is if they could get the same effect by using pushState to go from /0 to /1 rather than #0 and #1 Of course, since there's only 2 pages it switches between, they could create those pages on GitHub pages even though it doesn't support a catch-all route like surge.sh, firebase hosting, vercel, netlify, etc. allow on otherwise static sites.
- Aaron2222 3y agoIf going between #0 and #1 works (which it obviously does), then that saves having to change the URL to something the browser considers a different page (I'm not a web dev, so not sure if there's a way of changing the URL to a different page without needing to do a page reload, but having only one page seems cleaner either way).
- benatkin 3y agoThat's what pushstate does, is change the URL without changing the page. I'm not sure if the browser never does any extra work or if it just mostly doesn't do any extra work at that time. If the user goes to the url again later on it won't have an entry in the cache though.