AMP displaying incorrectly

#1
I am running my website with litespeed through my hosting service. I am currently using litespeed plugin for wordpress. I am using the official AMP plugin for AMP.

The amp pages are not rendering correctly.

With the litespeed plugin DEACTIVATED, the mobile site works fine.

However, with litespeed plugin ACTIVATED, the content of the AMP page shifts to the left and is very small, occupying only 1/4 of the mobile browser.

The followind is in htaccess:

# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule \.litespeed_conf\.dat - [F,L]

### marker MOBILE start ###
RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC]
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+ismobile]
### marker MOBILE end ###

### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###

Also, you will see that separate mobile cache is activated (attached PNG).

I don't think it is the mobile caching that is the issue. i tried to disable caching, and the same problem remains.

The problem disappears only when the wordpress litespeed plugin is disabled.

Why is litespeed causing a display rendering issue in AMP? if you need to view the production site, please visit:
https://ndvlaw.com/covid-19-labor-advisories/?amp=1

The screenshots pertain to the development site.

Please help.

Thanks!
 

Attachments

Last edited:
Top