I have enabled the LiteSpeed Cache plugin on my wp site and I managed to set it up in most areas easily.
However, these options can not be enabled or changed:
When I change these settings it refreshes and shows notification: Options saved. But when the page refreshes the options get back to disabled, or to predefined list of URIs.
This problem only refers to the above mentioned options. Other options are being enabled/disabled correctly.
]]>Obviously we deploy new CSS code from time to time, and when we do we want any return visitors of our website to have the latest code.
How we achieve this
When enqueuing this main-bundle.js file, using wp_enqueue_script() we provide a version number, which is (normally) appended onto the end of the file name e.g. main.bundle.js?ver=24.04.1
This means when we update our CSS, we update our version number. Browsers treat this as a new file and load the new code.
The issue
However, when using Speed Optimiser the contents of this file are loaded by other means (presumably lazy loading).
Accordingly, when we change our CSS code, the old code remains in browser cache.
—
How can we stop this happening?
]]>Error (E_WARNING): “Error (E_WARNING): “ini_set(): Session ini settings cannot be changed after headers have already been sent“ at `./wp-content/plugins/w3-total-cache/BrowserCache_Plugin.php:65 […]
It happens when calling the cron executor https://my.site/wp-cron.php.
The answer body size is 0 byte, so it’s probably not the automatic header process.
]]>Add browser caching rules for static assets: Enabled
I see in the .htaccess file that there are new lines as might be expected:
<FilesMatch "\.(css|js|pdf)$">
<IfModule mod_headers.c>
Header set Cache-Control "public, must-revalidate, proxy-revalidate, immutable, max-age=2592000, stale-while-revalidate=86400, stale-if-error=604800"
</IfModule>
</FilesMatch>
<FilesMatch "\.(jpg|jpeg|png|gif|ico|eot|swf|svg|webp|avif|ttf|otf|woff|woff2|ogg|mp4|mpeg|avi|mkv|webm|mp3)$">
<IfModule mod_headers.c>
Header set Cache-Control "public, must-revalidate, proxy-revalidate, immutable, max-age=31536000, stale-while-revalidate=86400, stale-if-error=604800"
</IfModule>
After repeated tests with webpagetest.org , results still show that many files are not getting browser caching eg:
FAILED (No max-age or expires): https://domain.tld/wp-content/uploads/2020/03/logo-1.png
Is there an additional step/action required besides enabling this feature ?
Thanks
]]>Is it possible to refresh the browser cache immediately after login? I’ve noticed that after login, some sections of my website display content intended for non-logged-in users due to browser caching.
]]>As I really know very little about this stuff, should I change Cloudflare Browser Cache TTL to 6 months? Or do I need to add expires headers to htaccess file? In case it matters, I host at A2hosting.
Current settings:
Cloudflare (free plan) Browser Cache TTL set to Respect Existing Headers
Cloudflare plugin settings:
Cloudflare Cache-Control max-age 31536000
Browser Cache-Control max-age 60
htaccess for Cloudflare shows:
<Files 403.shtml>
order allow,deny
allow from all
</Files>
Thanks!
]]>Im sorry to post this question but again, but i didnt find the answer anywhere.
My problem is that : Serve static assets with an efficient cache policy
I continue to get this error also if:
I correctly turned on the :
Report number: CJHCGVEC
Please can you help me to solve this clue?
]]>