diff --git a/services/web/frontend/js/features/pdf-preview/util/metrics.js b/services/web/frontend/js/features/pdf-preview/util/metrics.js index 21e37508f2..ce683cb128 100644 --- a/services/web/frontend/js/features/pdf-preview/util/metrics.js +++ b/services/web/frontend/js/features/pdf-preview/util/metrics.js @@ -4,7 +4,7 @@ import { trackPdfDownloadEnabled } from './pdf-caching-flags' // VERSION should get incremented when making changes to caching behavior or // adjusting metrics collection. -const VERSION = 8 +const VERSION = 9 // editing session id const EDITOR_SESSION_ID = uuid() diff --git a/services/web/frontend/js/features/pdf-preview/util/pdf-caching.js b/services/web/frontend/js/features/pdf-preview/util/pdf-caching.js index b0216a8ab8..960411cb88 100644 --- a/services/web/frontend/js/features/pdf-preview/util/pdf-caching.js +++ b/services/web/frontend/js/features/pdf-preview/util/pdf-caching.js @@ -472,6 +472,7 @@ function checkChunkResponse(response, estimatedSize, init) { export async function fallbackRequest({ url, start, end, abortSignal }) { try { const init = { + cache: 'no-store', headers: { Range: `bytes=${start}-${end - 1}` }, signal: abortSignal, } @@ -809,7 +810,10 @@ export async function fetchRange({ coalescedDynamicChunks.push({ chunk: dynamicChunks[0], url, - init: { headers: { Range: `bytes=${byteRanges}` } }, + init: { + cache: 'no-store', + headers: { Range: `bytes=${byteRanges}` }, + }, }) break case dynamicChunks.length <= MULTI_PART_THRESHOLD: @@ -820,7 +824,10 @@ export async function fetchRange({ coalescedDynamicChunks.push({ chunk, url, - init: { headers: { Range: `bytes=${chunk.start}-${chunk.end - 1}` } }, + init: { + cache: 'no-store', + headers: { Range: `bytes=${chunk.start}-${chunk.end - 1}` }, + }, }) }) break @@ -828,7 +835,10 @@ export async function fetchRange({ coalescedDynamicChunks.push({ chunk: dynamicChunks, url, - init: { headers: { Range: `bytes=${byteRanges}` } }, + init: { + cache: 'no-store', + headers: { Range: `bytes=${byteRanges}` }, + }, }) }