Extend cache (PDFs)
CachingApplies cache extension to linked PDF files.
Filter
extend_cache_pdfs
· Filter docs
A mod_pagespeed 1.1 filter. ModPageSpeed 2.0 applies it as part of one always-on pipeline, not as a separate switch.
Both frames render identically — that's the goal. The win is in the bytes and requests
below, not the look. They're served live by mod_pagespeed 1.1 on
demo-httpd-1.1.modpagespeed.com; the optimized frame
applies only this filter. Right after a cache purge it may briefly match the original while
the worker rewrites it — reload to see the result.
Measured impact
This filter changes how the page is structured or delivered, not its size — so there's no byte or request reduction to chart. The change shows in the source diff below.
What changed in the source
The page's HTML, before and after this filter. Red lines are removed, green lines are added.
… 11 unchanged lines …
<ul>
<li>Standard link to a pdf, will be cache extended:
- <a href="example.pdf">example.pdf</a></li>
+ <a href="example.pdf.pagespeed.ce.syqMpgS21L.pdf">example.pdf</a></li>
<li>Embedded pdf, will also be cache extended:
<br>
- <dd><embed src="example.pdf" width="150" height="100"></li>
+ <dd><embed src="example.pdf.pagespeed.ce.syqMpgS21L.pdf" width="150" height="100"></li>
<li>Link to a PDF with extension ".notpdf". It won't be cache extended
because a ".pdf" extension is required:
<a href="example.notpdf">example.notpdf</a></li>
<li>Link to a PDF with a query parameter, will be cache extended:
- <a href="example.pdf?a=b">example.pdf?a=b</a></li>
+ <a href="example.pdf,qa=b.pagespeed.ce.syqMpgS21L.pdf">example.pdf?a=b</a></li>
</dl>
</body>