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
### marker BROWSER CACHE start ###
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
### 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
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
Browser Cache
If you are using OpenLiteSpeed, please custom the Expired value, e.g. A315576000 from the LiteSpeed web admin > Server Configuration > General > Expires Settings because OLS only read rewrite rules from the .htaccess file, the rest rules will be ignored.
Unused Java Scripts
What LSCache did is to minify/combine the JS files that your site has, but it is actually not originally from LSCache. To verify it, you can deactivate the LSCache and check it on GTMetrix again.
Font Preload
Although the Font Preload is on the to-do, the server support server push feature a long time ago.
Check this forum https://wordpress.org/support/topic/use-preload-for-fonts/