-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Coming Soon: Set the headers to prevent caching for the different browsers. #47450
Conversation
Set the html and char types from bloginfo
Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com D52779-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing the Editing Toolkit Plugin for more info: PCYsg-ly5-p2 |
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
The content-type html header is already set, so doesn't need to be set again here.
We don't need to explicitly set the content-type header, it already gets set for us. Also the failing php tests are unrelated to this change, the tracking issue is #47255 |
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.
Tested in FF and Edge and works as expected
Thanks for handling this one @p-jackson ! |
Changes proposed in this Pull Request
Let's make sure we don't allow caching for the Coming Soon pages.
We'll also set the html and char types from bloginfoTesting instructions
Create a coming soon v2 site over at wordpress.com/new?flags=coming-soon-v2
I used Firefox, which seems to have a fairly aggressive caching approach.
With your new site in coming soon mode, open it in Firefox (logged out) and take a look at the network tab in the console for the HTML page.
Now run
yarn dev --sync
on this branch, and sandbox your new site.Refresh and make sure you can see expiry headers (in the past so as to invalidate the cache)