This isn't valid/present anymore on XF 2.1 though, based on my own install testing.xf_style_id
cookie
This isn't valid/present anymore on XF 2.1 though, based on my own install testing.
I get "HTTP ERROR 500" When i update .htaccess with the code that you refer on your plugin page.
Do i have to update .htaccess file in order to get this plugin work?
I am using latest xenforo version
I added following code into .htaccess file (begining line)
# LiteSpeed XenForo cache
<IfModule litespeed>
CacheLookup public on
RewriteEngine On
# cache
RewriteCond %{HTTP_COOKIE} !(xf_lscxf_logged_in|xf_user|xf_session_admin) [NC]
RewriteCond %{REQUEST_URI} !/install/ [NC]
RewriteRule .* - [E=Cache-Control:max-age=360,E="cache-vary:xf_style_id,xf_language_id"]
# no cache
RewriteCond %{HTTP_COOKIE} (xf_lscxf_logged_in|xf_user|xf_session_admin) [NC]
RewriteRule .* - [E=Cache-Control:vary=loggedin,E=Cache-Control:no-cache]
</IfModule>
.htaccess
file without running into any issues (5xx errors or otherwise).[Bug Fix] Fixed an issue when attempting to change style or language as a guest on a cached page.
just in time.... I actually just noticed this condition. Thank you.Michael A. updated LiteSpeed Cache for XF2 - Community with a new update entry:
LiteSpeed Cache for XF2 Community - 2.2.2
Read the rest of this update entry...
just in time.... I actually just noticed this condition. Thank you.
What is ahead on the roadmap for this add-on ?
I think with this latest update, you'll need to include "xf_style_id" cookie as a non-cache cookie. Otherwise, you'll have different styles cached for different pages depending on when they were loaded.
Where can I get 2.2.1? This new version (even the fix you posted) seems to create a lot of problems on my website...
Edit: On a re-read of your post I think I see the misunderstanding now. In the .htaccess rules for this plugin we vary cache on both language and style. So for page X, a cache copy can exist for "English + Style_1", "English + Style_2", and "French + Style_1" all at the same time ensuring that visitors get served the correct combination matching the values set in those cookies.
RewriteRule .* - [E=Cache-Control:max-age=360,E="cache-vary:xf_style_id,xf_language_id"]
I'm not familiar with nginx, but quick google makes it not clear how to vary on the cookieIs Anyone know how apply that or similar rule for nginx ?
Because i'm trying to using that plugin for cookie control on nginx fastcgi cache implement.
In nginx, i'm experiencing the wrong cache issues between light and dark styles... (some pages caching in dark mode even default style is light mode)
I'm curious about what kind of problems you are seeing? Not much has changed from v2.2.1 to v2.2.2.
For example: If I change the default theme and logout, that change is not reflected and guests will still be presented the old theme. That did not happen in the previous version.
Is this a bug?
After successful registration cookie "xf_lscxf_logged_in" isn't set.
Thanks!
xf_user
cookie is set it should be okay. Did you notice bad behavior after registering?We use essential cookies to make this site work, and optional cookies to enhance your experience.