I tested my site with Chrome and got the following recommendation:
The following resources are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers: style.css jquery.marquee.js jquery.marquee.css logo.png
How do I set the cache expiration for these files?
One of the way to Set cache expiration is by using . htaccess file. Below code will set expiration for it's respective file type, e.g. for CSS files expiration will be 14 days.
By default, each file automatically expires after 24 hours, but you can change the default behavior in two ways: To change the cache duration for all files that match the same path pattern, you can change the CloudFront settings for Minimum TTL, Maximum TTL, and Default TTL for a cache behavior.
Cache-Control: max-age=<seconds> This directive tells the browser or intermediary cache how long the response can be used from the time it was requested. A max-age of 3600 means that the response can be used for the next 60 minutes before it needs to fetch a new response from the origin server.
To use cache-control in HTML, you use the meta tag, e.g. The value in the content field is defined as one of the four values below. HTTP 1.1. Allowed values = PUBLIC | PRIVATE | NO-CACHE | NO-STORE.
One of the way to Set cache expiration is by using .htaccess file.
Below code will set expiration for it's respective file type, e.g. for CSS files expiration will be 14 days.
<IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 1 month" ExpiresByType application/javascript "access plus 1 year" ExpiresByType image/x-ico "access plus 1 year" ExpiresByType image/jpg "access plus 14 days" ExpiresByType image/jpeg "access plus 14 days" ExpiresByType image/gif "access plus 14 days" ExpiresByType image/png "access plus 14 days" ExpiresByType text/css "access plus 14 days" </IfModule>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With