Website optimization issue

Hello, i am trying to fix issues like compression enable and expiry headers for my website name www.shirtcy.com which is hosted on your server . when i add code manually according to instructions of GT Matrix in htaccess file but it does not working . when i google my problem they are suggesting me to find your httpd. config file and remove # tag from that code #LoadModule deflate_module modules/mod_deflate.so and from that one #LoadModule filter_module modules/mod_filter.so.

but i am not able to find that file first in my server folders of shirtcy . i found wp-config file but does not have that line of code in it .

And that is code that i am trying to add

AND I HAVE ALSO SS ATTACHED OF MY ISSUE IN GT MATRIX

  1. FOR COMPRESSION ENABLE

Compress HTML, CSS, JavaScript, Text, XML and fonts

AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml

Remove browser bugs (only needed for really old browsers)

BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

2 .FOR EXPIRY HEADERS

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/mp4 “access plus 1 year”
ExpiresByType video/mpeg “access plus 1 year”

CSS, JavaScript

ExpiresByType text/css “access plus 1 month”
ExpiresByType text/javascript “access plus 1 month”
ExpiresByType application/javascript “access plus 1 month”

Others

ExpiresByType application/pdf “access plus 1 month”
ExpiresByType application/x-shockwave-flash “access plus 1 month”

If you’re trying to target the “Leverage Browser Caching” part, you can’t fix that The four resources I see for that are Facebook (3) and cdn-cgi (1). The cdn-cgi resource is email obfuscation comes straight from Cloudflare. 1) That’s one very small resource where expiration doesn’t affect immediate performance. 20 You can turn it off in the Cloudflare Dashboard under Scrape Shield. And you have no control over Facebook resources, other than to not use them.

For Compression, the two resources listed are POST requests. I’m not entirely sure if Cloudflare will compress a POST resource. Maybe another @MVP knows.

1 Like