Skip to content

Set max-age so prefetch works#13281

Merged
delucis merged 3 commits intowithastro:mainfrom
KTibow:patch-2
Feb 20, 2026
Merged

Set max-age so prefetch works#13281
delucis merged 3 commits intowithastro:mainfrom
KTibow:patch-2

Conversation

@KTibow
Copy link
Copy Markdown
Contributor

@KTibow KTibow commented Feb 18, 2026

Description (required)

Netlify uses a cache-control of public,max-age=0,must-revalidate by default. This is problematic because, ever since the 5 minute rule for prefetching was turned off, every navigation sends both a prefetch request and a "has anything changed" request.

The fix is to let the browser cache it for a minute.

Related issues & labels (optional)

Discussed in #13279
Possible label: site improvement

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 18, 2026

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e709a43
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/69985638e441b30008ba8081
😎 Deploy Preview https://deploy-preview-13281--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sarah11918 sarah11918 added the site improvement Some thing that improves the website functionality - ask @delucis for help! label Feb 20, 2026
Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this detail and fixing it @KTibow!

@delucis delucis merged commit 4536c80 into withastro:main Feb 20, 2026
10 checks passed
HiDeoo added a commit to HiDeoo/docs that referenced this pull request Feb 23, 2026
* main:
  Update inferSize fetching behavior (withastro#13282)
  ci: update docs contributors (withastro#13292)
  feat(docs): Add Sevalla deployment guide and remove Kinsta deployment guide and assets (withastro#13286)
  Update link to current language tools repo (withastro#13287)
  Set max-age so prefetch works (withastro#13281)
  i18n(fr): add `errors/remote-image-not-allowed.mdx` (withastro#13288)
  i18n(ja): add integrations-guide/index.mdx (withastro#13194)
  i18n(zh-cn): Update cloudcannon.mdx (withastro#13257)
  i18n(zh-cn): Update configuration-reference.mdx (withastro#13259)
  i18n(zh-cn): Update `content-loader-reference.mdx` and `astro-content.mdx` (withastro#13260)
  i18n(zh-cn): Update `astro-assets.mdx` (withastro#13261)
  i18n(zh-cn): Update `api-reference.mdx` (withastro#13262)
  i18n(es): Update troubleshooting link to Spanish version (withastro#13266)
  ci: update error reference docs (withastro#13283)
  Bump Lunaria prerelease version (withastro#13285)
  i18n(fr): Fix french typo Tutorial p4 (withastro#13272)
  ci: update docs contributors (withastro#13268)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

site improvement Some thing that improves the website functionality - ask @delucis for help!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants