This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - |
- | 12:00 – 16:00 | 12:00 – 16:00 | 12:00 – 16:00 | 12:00 – 16:00 | 12:00 – 16:00 | - |
Supporter timezone: Europe/Zagreb (GMT+02:00)
Tagged: Compatibility
This topic contains 8 replies, has 2 voices.
Last updated by Dražen 1 year, 5 months ago.
Assisted by: Dražen.
Author | Posts |
---|---|
October 30, 2023 at 10:14 am #14689837 | |
Sebastian |
I am having the issue that every first time visit is a cache miss. I have opened a ticket with Litespeed: https://wordpress.org/support/topic/cache-miss-first-visit/#post-17159606 |
October 31, 2023 at 7:55 am #14697089 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, 1) I have checked the shared ticket and chat with my colleague, and I understand this issue happens only when browser redirect WPML mode is enabled ? 2) I created a minimal installation of WordPress, WPML, and all necessary WPML add-ons. You can access the WordPress dashboard using the link below: Kindly follow the steps below: This will help us to report the probable issue to the compatibility team and solve the possible problem faster. Thanks, |
November 1, 2023 at 11:14 am #14706765 | |
Sebastian |
Hello, No, I have disabled the "Browser language redirect" but enabled "Language filtering for AJAX operations". It seems that as soon as LiteSpeed Cache sees any WPML cookie it will not cache the first-visit, because he thinks he needs to exclude it, to be able to redirect to a specific language. LS Cache seems to not take the WPML settings into account to see if the Browser language redirect is enabled or not. I have opened up a ticket with LitespeedCache too: https://wordpress.org/support/topic/cache-miss-first-visit/#post-17161453 A Litespeed Partner has shared some light into the issue: I cannot replicate it in the test environment has it is not running on a OpenLiteSpeed or Litespeed Enterprise server. This server environment is needed to make LS cache working. WPML has to reach out to Litespeed to make sure the two plugins are actually fully compatible, as you note it on your website: https://wpml.org/plugin/litespeed-cache/ Currently the LiteSpeed Cache mishandles the first-visit, when WPML sets any cookie, but it should only disable first-visit cache, when "Browser language redirect" is really switched on. The best way would be to make sure that LS Cache Plugin checks the WPML settings if "Browser language redirect" is turned on. Would it be possible that WPML can get in touch with Litespeed to make sure the both plugins work together in a right manner? It is mandatory that he first-visit is actually a cache hit and not a miss, because especially on the first-visit speed is everything. Thanks a lot! |
November 1, 2023 at 1:18 pm #14707805 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks for providing an informative reply, it is very helpful. Before I escalate, would you be able to provide us a test site with only WPML Plugins, and LS while using the WP default theme, so we can check and confirm the issue and our 2nd tier can further confirm this before proceeding forward? I have enabled private reply for you. Let me know. Thanks, |
November 6, 2023 at 2:35 pm #14738993 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks for getting back. I have checked and I can see the same behavior with and without, WPML, there is a miss on the first cache load. Video: hidden link Maybe I am checking or doing something wrong, please check the video and let me know. Thanks, |
November 6, 2023 at 2:43 pm #14739057 | |
Sebastian |
Hello, LS cache empty => First visit: miss => First visit (other private browser window): hit. When the WPML AJAX is enabled the issue is that every first visit is a miss, so there is a cached version available, but it does not get served, because LS cache thinks it must disable the cache on first visit, because of the WPML Ajax cookie (which is not right, das it should only do that if WPML browser redirect is turned on). LS cache empty => First visit: miss => First visit (other private browser window): again miss. |
November 6, 2023 at 2:55 pm #14739099 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks for getting back. Do you mean it depends on the WPML "Language filtering for AJAX operations" option? If so, I think that is expected since as we say in our docs, we set the cookie even if the site is cached, so Ajax operation can work correctly, which then causes your cache to miss. You are mixing browser redirect settings and Ajax filtering, which are different things and used for different situations. For users that are not logged-in, WPML checks if this setting is turned on and if so, the language cookie is set using JavaScript. This allows WPML to set the language cookie even if the site is cached. You are free to disable this option, if you do not have any issues with Ajax filtering. Let me know. Regards, |
November 6, 2023 at 3:03 pm #14739223 | |
Sebastian |
Yes. I try to make it clearer. When I enable "Language filtering for AJAX operations" => This cookie is set by Javascript, so that it will also work on cached pages. The issue now is that LS cache does not register the difference. If it sees a WPML cookie, it will disable the cache on first visit, which results in serving non-cached pages, which is really bad for speed. As the "Language filtering for AJAX operations" is also working on cached pages, because it loads by JS, it does not need LS cache to disable cached first visit. Current behaviour: Language filtering for AJAX operations on => LS cache does not serve cached version Expected behaviour Language filtering for AJAX operations on => LS cache serve cached version |
November 7, 2023 at 8:39 am #14744417 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks for getting back and sharing more information on this. Okay, I can check further with 2nd tier on this and if there is anything we can do. One more thing, I am trying to confirm what you explained, but in the private incognito window I still keep getting LS cache hit even with WPML Ajax enabled. Can you please share step by step-by-step guide on how can I check the issue or a video of the steps? Thanks, |
The topic ‘[Closed] Litespeed every first time visit is a cache miss’ is closed to new replies.