From b93761f27596ecaa9f9bf7648dbd5030673e8788 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Wed, 26 May 2021 11:20:34 +0200 Subject: [PATCH] Merge pull request #4094 from overleaf/jpa-tag-pdf-caching-traffic [frontend] PdfController: tag traffic that uses the pdf caching logic GitOrigin-RevId: ab0d847ff1fe31131428c782ce95b3a5b3dff4fd --- .../web/frontend/js/ide/pdf/controllers/PdfController.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/web/frontend/js/ide/pdf/controllers/PdfController.js b/services/web/frontend/js/ide/pdf/controllers/PdfController.js index 996bda9994..ee46976e30 100644 --- a/services/web/frontend/js/ide/pdf/controllers/PdfController.js +++ b/services/web/frontend/js/ide/pdf/controllers/PdfController.js @@ -400,8 +400,13 @@ App.controller( ) if (window.location.search.includes('verify_chunks=true')) { + // Instruct the serviceWorker to verify composed ranges. qs.verify_chunks = 'true' } + if (getMeta('ol-enablePdfCaching')) { + // Tag traffic that uses the pdf caching logic. + qs.enable_pdf_caching = 'true' + } // convert the qs hash into a query string and append it $scope.pdf.url += createQueryString(qs)