The mobile cache is supposed to be used if your site has a different build for mobile that is separate to your main site . If your website is responsive and mobile-friendly, then you don't need this turned onHi guys
I have problems with the new Wp Rocket on the smartphone.
The menu won't pop up when I enable "Remove unused CSS".
But if I enable the "extra cache for mobile devices" function, everything works great. Should I always have extra cache created for my mobile display? Can it hurt to somehow affect CWV? I don't see any problems at least.
Thank you for the detailed answer.The mobile cache is supposed to be used if your site has a different build for mobile that is separate to your main site . If your website is responsive and mobile-friendly, then you don't need this turned on
Remember that using "Removed unused CSS" can break custom CSS or 3rd party css if it relies on media queries or JS that change how the page/tool is generated on different media screens. Or just in general.
Both mobile cache and unused css is turned off for me based on how they handle how the site is built. Cool features but with one being a beta feature I wouldn't rely on them.
You might also find your page speed isn't any different. Sometimes these add bloat as they inject CSS /JS on each page to save on loading in the files.
that's right i also got he trouble when i activated this (my post could'nt be clicked) but when it's turned off, it's back to normalThe mobile cache is supposed to be used if your site has a different build for mobile that is separate to your main site . If your website is responsive and mobile-friendly, then you don't need this turned on
Remember that using "Removed unused CSS" can break custom CSS or 3rd party css if it relies on media queries or JS that change how the page/tool is generated on different media screens. Or just in general.
Both mobile cache and unused css is turned off for me based on how they handle how the site is built. Cool features but with one being a beta feature I wouldn't rely on them.
You might also find your page speed isn't any different. Sometimes these add bloat as they inject CSS /JS on each page to save on loading in the files.
You're welcome. Odd to say you have the exact same setup but one works over the other. The only answer to this that I can think of is browser caching. Maybe you are seeing it working because the browser still has old CSS cached. Clear/reset your browser cache. Check in Incognito mode, or use a phone that isn't on the same network you are viewing the site on.Thank you for the detailed answer.
I use generatepress. The funny thing is that I have another site with 1:1 the same settings and there everything works as usual.
You can omit class, id or styles in the "Remove Unused css" function. I have tried this but somehow no attention is paid to the generatepress theme.
It's a nice feature but find it is still in Beta mode, or that it works really well if your site isn't heavily reliant on 3rd party plugins. Depending on that plugin sometimes it can break a function it relies on.that's right i also got he trouble when i activated this (my post could'nt be clicked) but when it's turned off, it's back to normal
It's a nice feature but find it is still in Beta mode, or that it works really well if your site isn't heavily reliant on 3rd party plugins. Depending on that plugin sometimes it can break a function it relies on.
Sorry yes you are correct. Got my wires mixed up thenChace option is not beta test, the beta test is CSS option
That's what I thought at first.You're welcome. Odd to say you have the exact same setup but one works over the other. The only answer to this that I can think of is browser caching. Maybe you are seeing it working because the browser still has old CSS cached. Clear/reset your browser cache. Check in Incognito mode, or use a phone that isn't on the same network you are viewing the site on.
This is guess work but can only assume it is this if all your plugins, generatepress setup is identical.
Try to omit class's and ID's that are affected on one site over the other and replicate it.
Let me know how you go, Hopefully you figure out why both are different.
While this has been discussed before, it's not actually the solution but more of fooling thy self. The real issue isn't about looking nice on dashboard; I discovered if not properly null, the UserClient() kept calling to API for verification with return of 404 response on each load. SO, I just add the code below:
delete_transient('rocket_check_key_errors'); $consumer_data = [ 'consumer_key' => '********', 'consumer_email' => '[email protected]', 'secret_key' => hash('crc32', '[email protected]'), ]; update_option('wp_rocket_settings', array_merge(get_option('wp_rocket_settings', [] ), $consumer_data)); add_filter('pre_http_request', function($pre, $parsed_args, $url) { if (strpos($url, 'https://wp-rocket.me/valid_key.php') !== false) { return [ 'response' => [ 'code' => 200, 'message' => 'ОК' ], 'body' => json_encode([ 'success' => true, 'data' => $consumer_data ]) ]; } else if (strpos($url, 'https://wp-rocket.me/stat/1.0/wp-rocket/user.php') !== false) { return [ 'response' => ['code' => 200, 'message' => 'ОК'], 'body' => json_encode([ 'licence_account' => '-1', 'licence_expiration' => 1893456000, ]) ]; } else { return $pre; } }, 10, 3);
in wp-rocket.php main plugin file right below #line 21 which reads 'defined( 'ABSPATH' ) || exit;' and above '// Rocket defines.'
It uses transient for checking key almost everywhere, so just delete it and feed what it wants to get before the plugin starts.
step 1: insert code
delete_transient( 'rocket_check_key_errors' );
$consumer_data = [
'consumer_key' => '********',
'consumer_email' => '[email protected]',
'secret_key' => hash( 'crc32', '[email protected]' ),
];
update_option( 'wp_rocket_settings', array_merge( get_option( 'wp_rocket_settings', [] ), $consumer_data ) );
add_filter( 'pre_http_request', function( $pre, $parsed_args, $url ) {
if ( strpos( $url, 'https://wp-rocket.me/valid_key.php' ) !== false ) {
return [
'response' => [ 'code' => 200, 'message' => 'OK' ],
'body' => json_encode( [
'success' => true,
'data' => $consumer_data,
] )
];
} else if ( strpos( $url, 'https://wp-rocket.me/stat/1.0/wp-rocket/user.php' ) !== false ) {
return [
'response' => [ 'code' => 200, 'message' => 'OK' ],
'body' => json_encode( [
'licence_account' => '-1',
] )
];
} else {
return $pre;
}
}, 10, 3 );
step 2: wp-rocket\inc\Engine\Admin\Settings\Page.php
find and edit
---------------------------------------------------------
public function customer_data() {
$user = $this->user_client->get_user_data();
$data = [
'license_type' => __( 'Infinite', 'rocket' ),
'license_expiration' => __( 'Lifetime', 'rocket' ),
'license_class' => 'wpr-isValid',
];
step 3:/wp-rocket/inc/functions/options.php
find and edit
---------------------------------------------------------
function rocket_valid_key() {
return true;
}
It's perfect
We need a better solution for this plugin. It looks like we are manually nulling it but not sure if the attached is already in a condition that people are suggesting through the post. I would touch base with @bobsmith and @Tomz. Or even @NullMaster to see what they think is best for this plugin.
*** Hidden text: cannot be quoted. ***
It looks like we are manually nulling
Wp-Rocket accounts for maybe only 40% of site speed for me.Some days ago, I saw that someone shared a, Best configuration settings(import file) to get a 90+ score. Cant find it now. Does anyone have that import file?