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

I have a website. And whenever I check my website on “GT Matrix” is show me the number of issue like, (expiration not specified) (expiration not specified) (expiration not specified) (expiration not specified) (expiration not specified) (expiration not specified) (expiration not specified) (expiration not specified) (expiration not specified) and so on.
How to fix this issue?

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:

Hope it helps :slightly_smiling_face:


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

Did you try reading the additional information page, as it provides a more comprehensive explanation of what’s needed?

One more thing I tell you I checked your 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

Thank you for give me this link.

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 ?!\


lines i aded:

ExpiresActive On


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”


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”


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