Website on mobile device loads first with desktop view when LiteSpeed Cache is enabled.

#1
Hello,

I am using Opencart 3.0.3.8, Journal 3 theme and have added LiteSpeed Cache to speed up website.

When LiteSpeed Cache is enabled, when I visit website on mobile device, website first shows with desktop view instead of mobile view. When refresh website, it switches to mobile view. This happens every time when new mobile device goes to website or I haven't used website in a while. When I disable LiteSpeed Cache this problem dissapears and website loads on mobile view as I visit it first time on mobile device.

Separate View for Mobile Device option is enabled as well.

Do you have fix for this? Thanks!
 
#3
Thank you for response and answer!

If current website hosting is on LiteSpeed Enterprise base, which solution would you suggest from your sent? Also, I am not very familiar with codes and your first solution may be difficult to implement for me.
 

serpent_driver

Well-Known Member
#4
The first solution is just a manual replacement of current cache varies made the plugin, so you only have to remove the current defines in .htaccess and replace them.
 

AndreyPopov

Well-Known Member
#8
Separate View for Mobile Device option is enabled as well.
you also must UNcomment Rewrite Rules that added to .htaccess by plugin

after that - Purge All LiteSpeed cache

if you not use Journal webp support (System - Settings - Perfomance - Images - Compession (Beta)) - nothing need to do more


P.S. also check that LSCache Rewrite Rules placed before any others Rewrite Rules
 
Last edited:
Top