mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #10156 from overleaf/jpa-web-disable-prefetch
[web] pdf-caching: double down on disabling of prefetching GitOrigin-RevId: 60ccea883786bad306a747b5a182982bc648bbbd
This commit is contained in:
parent
07ac37e382
commit
a0c180d133
2 changed files with 3 additions and 2 deletions
|
@ -4,7 +4,7 @@ import { trackPdfDownloadEnabled } from './pdf-caching-flags'
|
||||||
|
|
||||||
// VERSION should get incremented when making changes to caching behavior or
|
// VERSION should get incremented when making changes to caching behavior or
|
||||||
// adjusting metrics collection.
|
// adjusting metrics collection.
|
||||||
const VERSION = 7
|
const VERSION = 8
|
||||||
|
|
||||||
// editing session id
|
// editing session id
|
||||||
const EDITOR_SESSION_ID = uuid()
|
const EDITOR_SESSION_ID = uuid()
|
||||||
|
|
|
@ -648,7 +648,8 @@ export async function fetchRange({
|
||||||
preprocessFileOnce({ file, usageScore, cachedUrls })
|
preprocessFileOnce({ file, usageScore, cachedUrls })
|
||||||
const startXRefTableRange =
|
const startXRefTableRange =
|
||||||
Math.floor(file.startXRefTable / PDF_JS_CHUNK_SIZE) * PDF_JS_CHUNK_SIZE
|
Math.floor(file.startXRefTable / PDF_JS_CHUNK_SIZE) * PDF_JS_CHUNK_SIZE
|
||||||
const prefetchXRefTable = startXRefTableRange > 0 && start === 0
|
const prefetchXRefTable =
|
||||||
|
prefetchingEnabled && startXRefTableRange > 0 && start === 0
|
||||||
const prefetched = getMatchingChunks(file.prefetched, start, end)
|
const prefetched = getMatchingChunks(file.prefetched, start, end)
|
||||||
|
|
||||||
// Check that handling the range request won't trigger excessive sub-requests,
|
// Check that handling the range request won't trigger excessive sub-requests,
|
||||||
|
|
Loading…
Reference in a new issue