-
Notifications
You must be signed in to change notification settings - Fork 211
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
Enable assets optimizations on uncached pages #2713
Comments
Is uncached = logged-in with no user cache too? Or is it only pages excluded from cache in our configuration? |
@Tabrisrp I would stick with pages specifically excluded from cache. Otherwise users will not have an option to disable these settings. |
Let's first do it for uncached pages and not for logged-in users. |
|
@Tabrisrp Are the questions for Arun / me or the dev team? |
@webtrainingwheels Why do you think about doing it only for uncached pages? Should we also do it for logged-in users? What are the user feedback on support about that? |
It seems like a product question. I forgot the consider these.
@GeekPress @webtrainingwheels what do you think? |
I believe it's possible, we'll have to discuss this with the dev team. It does increase complexity of course, but if we are aware of that before starting, we can manage it.
Well it's any type of content that is not a post of any type. Mainly terms. They are used a lot but don't have a way to be configured individually. |
Thanks, Jo! I love this idea! I've proposed this in some nonces related issues where the only option was to exclude the pages from the cache. And I would vote for enabling the optimizations for uncached pages for logged-in users only when the User Cache is enabled. Because I guess that no cache and no optimizations sounds like the default meaning of having the User Cache feature disabled. |
@GeekPress For me personally, nothing should be applied for logged-in users, unless they have enabled User Cache. I think the lack of minify/combine here will disappoint customers. I agree we don't want to add those features if they make the pages slower. In the future it would be great to optimize those features to make it possible. |
@camilamadronero @webtrainingwheels Thanks for the reminder, I totally forget the « User Cache » option 😱 You're right, let's keep the current behavior for logged-in users! @wp-media/wprocketplugin @hellofromtonya I suppose you have all infos for splitting this epic card. |
The title of the epic is misleading in my opinion, the way the story is layed out, this optimizations are only applied to:
I think it's something to consider when we communicate this to our users, because even for us in the dev team, it's confusing |
@Tabrisrp Thanks for the heads up. Do you have any suggestions? I thought of this:
I guess we can include it as part of the description of the feature. |
This feature has been removed from 3.7. As it seems to require more discussion to get something done right, we will take the time to debate about it. |
@GeekPress Can you please confirm the topics that needs discussion related to this? What decisions needs to be made? |
a similar request from the customer: https://secure.helpscout.net/conversation/1432788151/241369?folderId=3864740 |
Another request: https://secure.helpscout.net/conversation/1464606228/250800/ |
Related request - https://secure.helpscout.net/conversation/1551697798/274008 |
Hi, I would then add a new setting at plugin level that allows to choose on what of the above apply the optimizations.
and a textarea to disable on specific uncached urls. This new setting will have no effect on excluded url by metabox ( for which the optimizations will be chosen with the metabox) Also would be great if you increased the priority: this could get in new users that don't need page caching but need only an optimization toolbox |
Revisiting this one.
|
What are we proposing to do?
With this enhancement our users will be able to use WP Rocket’s features on uncached pages.
Currently these features ARE available on uncached pages:
We could safely add the following features as well:
Users will be able to turn some of these off on a post by post basis.
Why are we doing this?
Currently if a page is excluded from WP Rocket cache, most optimizations are not applied to the excluded page. Uncached pages can still benefit from WP Rocket with the other features we have.
Benchmark Tests
Test site: http://mega.wp-rocket.me/
The main purpose of the test is to see if any of our options are massively slowing down the load time. The homepage barely has assets or images that could greatly benefit from our optimizations.
Control test: WP Rocket disabled
Fully loaded time average: 2.44s (#1, #2, #3, #4, #5)
For the rest of the tests, WP Rocket page caching is disabled using our helper plugin.
Test with WP Rocket enabled but all options are disabled.
Fully loaded time average: 2.46s (#1, #2, #3, #4, #5)
Test with Optimize Google Fonts, Optimize CSS delivery, Remove jQuery Migrate and Defer JS (safe mode) enabled.
Fully loaded time average: 2.52s (#1, #2, #3, #4, #5)
Along with the options in the previous test, LazyLoad(images and iframe), Disable Emoji and Disable Emeds was enabled.
Fully loaded time average: 2.22s (#1, #2, #3, #4, #5)
Along with the options in the previous test, enabled minification for CSS and minification for JS
Fully loaded time average: 2.34s (#1, #2, #3, #4, #5)
Along with the options in the previous test, combination of CSS and combination of JS was enabled
Fully loaded time average: 2.36s (#1, #2, #3, #4, #5)
To reconfirm this, I used a test page with a lot more assets and images: http://smashingcoding.com/2020/06/01/lighthouse/
Control test: WP Rocket disabled
Fully loaded time average: 6.12s (#1, #2, #3, #4, #5)
For the rest of the tests, WP Rocket page caching is disabled using our helper plugin.
Test with WP Rocket enabled but all options are disabled.
Fully loaded time average: 5.86s (#1, #2, #3, #4, #5)
Test with Optimize Google Fonts, Optimize CSS delivery, Remove jQuery Migrate and Defer JS (safe mode) enabled.
Fully loaded time average: 5.44s (#1, #2, #3, #4, #5)
Along with the options in the previous test, LazyLoad(images and iframe), Disable Emoji and Disable Embeds was enabled.
Fully loaded time average: 4.26s (#1, #2, #3, #4, #5)
I did another 13 tests to confirm and the average fully loaded time was (13 tests): 3.94s
Combined average (13+5 = 18 tests): 4.02s
Along with the options in the previous test, enabled minification for CSS and minification for JS
Fully loaded time average: 4.35s (#1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11, #12, #13, #14, #15)
Along with the options in the previous test, combination of CSS and combination of JS was enabled
Fully loaded time average: 4.52s (#1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11, #12, #13, #14, #15)
Notes:
Based on the data above, it’s best not to enable CSS minification and combination on uncached pages. Here are the features that won’t be available on uncached pages.
User expectations and experience. How will we do this feature?
We can easily take advantage of our existing WP Rocket meta box (with some changes) to do this feature.
This is how WP Rocket meta box looks like right now:
Right now:
This creates a potential problem if the new features are applied to uncached pages automatically when a customer updates to the new WP Rocket version.
To accommodate our existing users and mitigate this problem, we can have a two step approach.
Recommended changes to the WP Rocket meta box in the post editor.
A note on auto-exclusions
WP Rocket auto exclusions like WooCommerce cart, account and checkout pages for example are not reflected in the WP Rocket UI and are added directly to the config file. In the meta box for these pages, “Never cache this page” is never checked, nor are these pages listed in “Never Cache URL(s)” in the advanced tab.
Handling opt-in for existing users
Similar to how we handled this in “CPCSS for Mobile”, we could provide an opt-in “tool” in the Tools tab of WP Rocket.
The goal of this tool is to:
Technical Specs
Spec for the tool in the “Tools” tab:
Title: “Optimize Uncached Pages”
Icon: Use the same icon from the “Cache” tab - https://jmp.sh/4zgrDDw (since it’s related to cached and uncached pages)
Description: Uncached pages on your website are excluded from all WP Rocket features. Click the button to enable certain WP Rocket features on uncached pages.
This is a one-time action and this button will be removed afterwards. More info
The following pages will be affected:
Button color: Blue
Button text: Enable Optimizations on Uncached Pages
Button need not have any icon
Risks
We are handling any potential risk by making this feature opt-in for existing customers.
For new customers and for customers who opt-in to this feature, most of the features that could potentially break a website can be individually disabled via the meta box.
Features that are not available in the meta box namely, “Optimize Google Fonts”, “Remove jQuery Migrate”, “Prefetch DNS”, “Preload for fonts”, “Google Tracking Add-on”, “Facebook Pixel Add-on”, are typically sitewide and are unlikely to cause an issue on a specific page. If this becomes an issue, we can offer helper plugins to disable this, or add this to the meta box if a huge number of customers face issues.
Acceptance Criteria
Documentation and Translations
The text was updated successfully, but these errors were encountered: