4 ms·
How so people feel about client side navigation? Browsing svelte.dev it appears back/forward navigation now requires a request each time as browser cache is no
by lewantmontreal 4y ago
How so people feel about client side navigation? Browsing svelte.dev it appears back/forward navigation now requires a request each time as browser cache is no longer usable.
Page refresh also seems to reset scroll position but that might be unrelated.
- dcre 4y agoThis appears to be deliberate depending on the page. Looking at the network inspector as I click around, I see cache-control: private, no-cache on the responses for docs content, but I do see caching on the blog pages.
- swyx 4y agoits just a setting now on sveltekit. clientside navigation is a single line of code
- Lukas_S 4y agoSveltekit saves your scroll position in session storage so refresh and back/forward navigation feels like regular browser behavior. If your scroll position is resetting on refresh that may be a bug. Navigating back/forward will only make a new request if that page needs to fetch data in its +page.js component https://kit.svelte.dev/docs/load https://kit.svelte.dev/docs/load