We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06a9a0a commit cbe616aCopy full SHA for cbe616a
1 file changed
src/prefetch.mjs
@@ -110,8 +110,14 @@ function prefetcher(url, isPriority) {
110
}
111
112
if ('connection' in navigator) {
113
- // Don't prefetch if the user is on 2G or if Save-Data is enabled...
114
- if ((navigator.connection.effectiveType || '').includes('2g') || navigator.connection.saveData) return;
+ // Don't prefetch if the user is on 2G...
+ if ((navigator.connection.effectiveType || '').includes('2g')) {
115
+ return;
116
+ }
117
+ // Don't prefetch ifSave-Data is enabled...
118
+ if (navigator.connection.saveData) {
119
120
121
122
123
// Wanna do something on catch()?
0 commit comments