I host my portfolio and resume using GitHub Pages. Recently, after updating my resume PDF, I noticed something odd: on some devices, the link still opened an older version, even though the repository clearly had the latest file.
After testing across devices and networks, it became clear that this wasn’t a deployment issue. The problem was browser caching, which is particularly aggressive for PDFs served as static assets.
After some research, I found a few possible solutions.
Example:
resume_v1.pdf → resume_v2.pdf
This works because browsers treat it as a brand‑new file.
But here’s the problem:
Changing the filename means updating links everywhere, every single time.
Not scalable. Not safe.
Example:
resume.pdf?v=2
This sometimes works for images and scripts.
But for PDFs:
Too unreliable for something as important as a resume.
This is basically trusting browser cache expiry magic 😄
Which… is not a strategy.
I chose a stable link + redirect approach.
This felt like the most robust and professional solution.
<meta http-equiv="cache-control" content="no-cache" />
<!-- Forces the browser to revalidate before using cached content -->
<meta http-equiv="expires" content="0" />
<!-- Marks the page as already expired -->
<meta http-equiv="pragma" content="no-cache" />
<!-- Fallback for older browsers -->
<meta http-equiv="refresh" content="0; url=../resume_v2.pdf" />
<!-- Instantly redirects to the latest resume version -->
A clean, future‑proof way to serve a resume on GitHub Pages