Group Group Group Group Group Group Group Group Group

How to fix this "expiration not specified" issue according to GTMatrix?

#1

I have a website. And whenever I check my website on “GT Matrix” is show me the number of issue like,
https://www.weetechsolution.com/css/content_slider_style.css (expiration not specified)
https://www.weetechsolution.com/css/glob_compress.css (expiration not specified)
https://www.weetechsolution.com/css/home_compress.css (expiration not specified)
https://www.weetechsolution.com/css/portfolio/cubeportfoliocss.css (expiration not specified)
https://www.weetechsolution.com/font-awesome/css/font-awesome.min.css (expiration not specified)
https://www.weetechsolution.com/images/ci-sprite.png (expiration not specified)
https://www.weetechsolution.com/images/how-we-work.png (expiration not specified)
https://www.weetechsolution.com/images/left2.png (expiration not specified)
https://www.weetechsolution.com/images/live_project_sprite.png (expiration not specified) and so on.
How to fix this issue?

#2

Hi @jennysmith, the error “expiration not specified” relates to support for caching of the network requests. Without specifying an expiration date, clients are unable to determine how long they should cache the response for hence seeing this warning.

If you don’t care about being able to cache your responses then you can probably leave it, it not you need to look into adding these headers, you can find more info about this here: https://gtmetrix.com/add-expires-headers.html.

Hope it helps :slightly_smiling_face:

2 Likes
#3

Thank you so much.
And yes it’s really helpful guidance for me.

#4

Did you try reading the additional information page, as it provides a more comprehensive explanation of what’s needed?
https://gtmetrix.com/leverage-browser-caching.html

One more thing I tell you I checked your weetechsolution.com website on GTMatrix and find the number of issues occur on your website like.

  1. 50+ images are need to optimization.
  2. 50+ links has expiration not specified. And many more.
1 Like
#5

Thank you for give me this link.

#7

hi dear friend

i found htaccess.txt file and added requested lines in it and saved but the problem still exist and nothing changes :expressionless:
Can u tell me what is the problem ?!\

tnx

#8

lines i aded:

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”