-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add CDN #2871
feat: add CDN #2871
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
a5d5f57
to
e7b5474
Compare
size-limit report 📦
|
Co-authored-by: Lewis Cowper <[email protected]>
Marking pull request as stale since there was no activity for 30 days |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: npm ci --workspace=@contentful/f36-cdn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today I learned.
Just a general question but shouldn't a CDN generally be served from a different domain to avoid wasting bytes on cookies from the web app? |
Yes, to save every single byte, we would need to use a totally separate domain. For the Web App itself, the HTML is loaded from app.contentful.com and the static files from static.contentful.com to reduce the number of cookies. Not all cookies have strict same site policy, so they are also sent to static.contentful.com. Fonts are only loaded once per page load (+within apps) and are not render blocking. Having a separate domain would have an insignificant performance improvement. By using a |
Creating a CDN for Forma using Fastly Compute to host the Geist font: https://vercel.com/font.
Adds a GH action that auto-deploys the CDN when merging to
main
.The files will be deployed as
https://cdn.f36.contentful.com/*
. You can try an example deploy with an older font version: https://cdn.f36.contentful.com/fonts/geist-sans-1.3.0.woff2