Skip to content

Conversation

@rrennick
Copy link
Contributor

@rrennick rrennick commented Jun 24, 2020

All Submissions:

Changes proposed in this Pull Request:

This PR updates the logic in #26802 to add a user agent check for googleweblight and changes the value passed to the filter to false.

Closes #25833 .

How to test the changes in this Pull Request:

  1. Open the network tab in your browser console.
  2. Navigate to the shop page.
  3. Check the headers for cache-control: no-cache, no-store, must-revalidate
  4. Add the filter add_filter( 'woocommerce_enable_nocache_headers', '__return_true' );
  5. Reload the page
  6. Check the headers for cache-control: no-transform, no-cache, no-store, must-revalidate

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changelog entry

Tweak - Limit nocache headers to googleweblight by default.

Copy link
Contributor

@claudiosanches claudiosanches left a comment

Choose a reason for hiding this comment

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

Great work!

@woocommercebot woocommercebot added status: approved and removed Mobile Issues related to how WooCommerce works on mobile devices. status: needs review labels Jun 24, 2020
@rrennick rrennick merged commit 84f5e61 into master Jul 1, 2020
@rrennick rrennick deleted the fix/25833-2 branch July 1, 2020 12:31
@woocommercebot woocommercebot added release: add changelog Mark all PRs that have not had their changelog entries added. [auto] release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] labels Jul 1, 2020
@claudiosanches claudiosanches added this to the 4.4.0 milestone Jul 1, 2020
@claudiosanches claudiosanches removed the release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] label Jul 1, 2020
@Konamiman Konamiman removed the release: add changelog Mark all PRs that have not had their changelog entries added. [auto] label Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

$headers[‘Cache-Control’] = no-transform interfering with CloudFlare compression

5 participants