Skip to content
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

Merged
merged 2 commits into from
Nov 16, 2020

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Nov 16, 2020

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 bloginfo

Testing 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.

Screen Shot 2020-11-16 at 8 38 59 pm

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)

Screen Shot 2020-11-16 at 8 40 06 pm

Set the html and char types from bloginfo
@ramonjd ramonjd added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Coming Soon Editing Toolkit For issues and PRs that affect the Editing Toolkit plugin labels Nov 16, 2020
@ramonjd ramonjd requested a review from a team November 16, 2020 09:42
@ramonjd ramonjd self-assigned this Nov 16, 2020
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

Caution: This PR affects files in the Editing Toolkit Plugin on WordPress.com
Please ensure your changes work on WordPress.com before merging.

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

@matticbot
Copy link
Contributor

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.

@ramonjd ramonjd added the [Pri] High Address as soon as possible after BLOCKER issues label Nov 16, 2020
The content-type html header is already set, so doesn't need to be set
again here.
@p-jackson
Copy link
Member

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

Copy link
Member

@p-jackson p-jackson left a 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

@p-jackson p-jackson merged commit 52208e0 into master Nov 16, 2020
@p-jackson p-jackson deleted the add/coming-soon-set-headers branch November 16, 2020 22:31
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 16, 2020
@p-jackson p-jackson mentioned this pull request Nov 16, 2020
8 tasks
@ramonjd
Copy link
Member Author

ramonjd commented Nov 17, 2020

Tested in FF and Edge and works as expected

Thanks for handling this one @p-jackson !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Coming Soon Editing Toolkit For issues and PRs that affect the Editing Toolkit plugin [Pri] High Address as soon as possible after BLOCKER issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants