|
@@ -6,6 +6,7 @@ let lastTouchTimestamp
|
|
|
|
|
|
const prefetcher = document.createElement('link')
|
|
const prefetcher = document.createElement('link')
|
|
const isSupported = prefetcher.relList && prefetcher.relList.supports && prefetcher.relList.supports('prefetch')
|
|
const isSupported = prefetcher.relList && prefetcher.relList.supports && prefetcher.relList.supports('prefetch')
|
|
|
|
+const allowQueryString = 'instantAllowQueryString' in document.body.dataset
|
|
|
|
|
|
if (isSupported) {
|
|
if (isSupported) {
|
|
prefetcher.rel = 'prefetch'
|
|
prefetcher.rel = 'prefetch'
|
|
@@ -97,6 +98,10 @@ function isPreloadable(linkElement) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (!allowQueryString && urlObject.search) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
if (urlObject.pathname + urlObject.search == location.pathname + location.search && urlObject.hash) {
|
|
if (urlObject.pathname + urlObject.search == location.pathname + location.search && urlObject.hash) {
|
|
return
|
|
return
|
|
}
|
|
}
|