[Feature Request] Exclude prefetch on mobile #1775
Replies: 1 comment 1 reply
-
Thanks for your feedback. Starlight only relies on the Astro Prefetch feature when it comes to prefeetching. If a user manually configure prefetching in their Astro configuration, Starlight will not modify it so a user can choose to disable prefetching, change the prefetch strategy, etc. If no prefetching is configured by the user, Starlight will automatically apply a configuration to prefetch all pages using the default Prefetch strategy which is On top of that, if a visitor is using data saver mode or has a slow connection, prefetch will fallback to the tap strategy which prefetch just before you click on the link. Quickly hovering or scrolling over links will not prefetch them. I tried to confirm this behavior by checking the network requests in the browser's dev tools on both a desktop and mobile devices and this seems to be working as expected where on desktop the prefetching is triggered when hovering over a link and on mobile I do not get a prefetch even when scrolling through sidebar links. Are you seeing a different behavior on your end? |
Beta Was this translation helpful? Give feedback.
-
What version of
starlight
are you using?latest
What is your idea?
When a client loads the site via mobile browser, we should be able to disable prefetching.
As it makes less sense on slow connections and might negatively affect google speed rankings
Why is this feature necessary?
I would say it's nice to have, but it is kinda required if users want to stay "on top" of SEO
Do you have examples of this feature in other projects?
No response
Participation
Beta Was this translation helpful? Give feedback.
All reactions