GT Metrix Errors

av_admin

Well-Known Member
#1
Hi dear Support Team

This is new report number:
Report number: OLZLUYZY


1-Serve static assets with an efficient cache policy
There are lots of .mp4/woff/woff2/png files that have no CACHE TTL or just 1week ttl
https://prnt.sc/AhbiAm19HjzU
but in my .htaccess file I see these : A315576000 means 180 days to expire
Code:
### marker BROWSER CACHE start ###
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType application/pdf A315576000
ExpiresByType image/x-icon A315576000
ExpiresByType image/vnd.microsoft.icon A315576000
ExpiresByType image/svg+xml A315576000

ExpiresByType image/jpg A315576000
ExpiresByType image/jpeg A315576000
ExpiresByType image/png A315576000
ExpiresByType image/gif A315576000
ExpiresByType image/webp A315576000

ExpiresByType video/ogg A315576000
ExpiresByType audio/ogg A315576000
ExpiresByType video/mp4 A315576000
ExpiresByType video/webm A315576000

ExpiresByType text/css A315576000
ExpiresByType text/javascript A315576000
ExpiresByType application/javascript A315576000
ExpiresByType application/x-javascript A315576000

ExpiresByType application/x-font-ttf A315576000
ExpiresByType application/x-font-woff A315576000
ExpiresByType application/font-woff A315576000
ExpiresByType application/font-woff2 A315576000
ExpiresByType application/vnd.ms-fontobject A315576000
ExpiresByType font/ttf A315576000
ExpiresByType font/otf A315576000
ExpiresByType font/woff A315576000
ExpiresByType font/woff2 A315576000

</IfModule>
### marker BROWSER CACHE end ###
But GTmetrix could not detect that !

2-remove unused Java Scripts / this file belongs to Litespeed chache plugin and was repated 6 times on Iteams in Gtmetrix :
*Use passive listeners to improve scrolling performance
*Reduce unused JavaScript
*Avoid long main-thread tasks
*Reduce JavaScript execution time
*Avoid serving legacy JavaScript to modern browsers
please see the images :
https://prnt.sc/bwMd6iLEZqo0
https://prnt.sc/DxIfdR9-gln2
Is there any suggestion to solve that ?

3-Based on Litespeed dos not support Perload the font yeat , I found the code for that and suould put in htaccess file
Code:
Header add Link "</wp-content/themes/betheme/fonts/fontawesome/fa-solid-900.woff2>; rel=preload; as=font; crossorigin=anonymous"
Header add Link "</wp-content/themes/betheme/fonts/mfn/icons.woff?31690507>; rel=preload; as=font; crossorigin=anonymous"
but it’s not working and still get error of Avoid chaining critical requests
Can you please tell me or guid me what should I do for this one ?

Thanks alot
I love you Litespeed Cache Plugin and Team
 

av_admin

Well-Known Member
#3

serpent_driver

Well-Known Member
#4
Yes , Exactly , But did I get my answer ? it's been 14 days and waiting for an answer...
Please tell me who is responsible for email support or wordpress support ?
And how can I solve that issue?
Thanks

You got the answer! Anything you have to do is reading the answers and following posted links.

This forum is for LiteSpeed webserver support. Responsibility for Wordpress cache plugin is at Wordpress plugin page.
https://wordpress.org/support/topic/gt-metrix-errors/
 

av_admin

Well-Known Member
#5
You got the answer! Anything you have to do is reading the answers and following posted links.

This forum is for LiteSpeed webserver support. Responsibility for Wordpress cache plugin is at Wordpress plugin page.
https://wordpress.org/support/topic/gt-metrix-errors/
Dont ever never talk with confidence , No one answered in that post just @qtwrk asked for report number and disappeard ...


And here they talked about wordpress https://www.litespeedtech.com/suppo...rol-no-cache-but-x-litespeed-cache-hit.17064/
 

serpent_driver

Well-Known Member
#6
Support for cache plugin in this forum has been closed some years ago.
https://www.litespeedtech.com/support/forum/threads/please-use-the-official-wordpress-forum.16028/

Again, if you follow the link to cache plugin documentation you will get answered all your questions.
https://docs.litespeedtech.com/lscache/lscwp/cache/#browser-tab

You only have to enable setting for browser cache. If done GTmetrix will get what you did wrong. GTmetrix expects cache-control not expire definition! Learning what the difference is: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

You don't have set definition for preloading fonts with PUSH. LiteSpeed webserver does it automatically if it is defined in theme.

Nevertheless, if you read the documentation you will get all answers for your questions.
https://docs.litespeedtech.com/lscache/lscwp/
 

av_admin

Well-Known Member
#16
Code:
# 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 ###

### marker LOGIN COOKIE start ###
RewriteRule .? - [E="Cache-Vary:,wp-postpass_5f10ff639100134ff7806b7e970ded92"]
### marker LOGIN COOKIE end ###

### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###

### marker CORS start ###
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font\.css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
### marker CORS end ###

### marker WEBP start ###
RewriteCond %{HTTP_ACCEPT} "image/webp" [or]
RewriteCond %{HTTP_USER_AGENT} "Page Speed"
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
RewriteCond %{HTTP_USER_AGENT} iPhone.*Version/(\d{2}).*Safari
RewriteCond %1 >13
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
### marker WEBP end ###

### marker DROPQS start ###
CacheKeyModify -qs:fbclid
CacheKeyModify -qs:gclid
CacheKeyModify -qs:utm*
CacheKeyModify -qs:_ga
### marker DROPQS end ###

</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker BROWSER CACHE start ###
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType application/pdf A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType image/vnd.microsoft.icon A31536000
ExpiresByType image/svg+xml A31536000

ExpiresByType image/jpg A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType image/png A31536000
ExpiresByType image/gif A31536000
ExpiresByType image/webp A31536000

ExpiresByType video/ogg A31536000
ExpiresByType audio/ogg A31536000
ExpiresByType video/mp4 A31536000
ExpiresByType video/webm A31536000

ExpiresByType text/css A31536000
ExpiresByType text/javascript A31536000
ExpiresByType application/javascript A31536000
ExpiresByType application/x-javascript A31536000

ExpiresByType application/x-font-ttf A31536000
ExpiresByType application/x-font-woff A31536000
ExpiresByType application/font-woff A31536000
ExpiresByType application/font-woff2 A31536000
ExpiresByType application/vnd.ms-fontobject A31536000
ExpiresByType font/ttf A31536000
ExpiresByType font/otf A31536000
ExpiresByType font/woff A31536000
ExpiresByType font/woff2 A31536000

</IfModule>
### marker BROWSER CACHE end ###

## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^ar/wp-login.php /wp-login.php [QSA,L]
RewriteRule ^en/wp-login.php /wp-login.php [QSA,L]
RewriteRule ^fa/wp-login.php /wp-login.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
# AMPFORWPLBROWSERCSTART Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-opentype .otf
AddType application/x-font-woff .woff
AddType image/svg+xml .svg
ExpiresByType application/vnd.ms-fontobject "access 1 year"
ExpiresByType application/x-font-ttf "access 1 year"
ExpiresByType application/x-font-opentype "access 1 year"
ExpiresByType application/x-font-woff "access 1 year"
ExpiresByType image/svg+xml "access 1 year"
ExpiresByType image/webp "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType text/css "access 3 month"
ExpiresByType text/javascript "access 3 month"
ExpiresByType application/javascript "access 3 month"
ExpiresByType application/x-javascript "access 3 month"
ExpiresByType application/xhtml-xml "access 3 month"
ExpiresByType application/pdf "access 3 month"
ExpiresByType application/x-shockwave-flash "access 3 month"
</IfModule>
# END Caching AMPFORWPLBROWSERCEND

# BEGIN BETHEME
<IfModule mod_expires.c>
ExpiresActive On

# Images
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"

# Video
ExpiresByType video/webm "access plus 1 year"
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType video/mpeg "access plus 1 year"

# Fonts
ExpiresByType font/ttf "access plus 1 year"
ExpiresByType font/otf "access plus 1 year"
ExpiresByType font/woff "access plus 1 year"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"

# CSS, JavaScript
ExpiresByType text/css "access plus 6 months"
ExpiresByType text/javascript "access plus 6 months"
ExpiresByType application/javascript "access plus 6 months"

# Others
ExpiresByType application/pdf "access plus 6 months"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"

ExpiresDefault "access 1 month"

</IfModule>
# END BETHEME
 

serpent_driver

Well-Known Member
#19
You did much, too much. Reset all settings and set do default. If done go to Wordpress cache plugin support and report your issue again or update the current thread. This forum is not the right place. Without physical access to your server nobody can help you. Maybe plugin support at Wordpress.
 
Top