Reputation: 5423
how do I set expiry date for an image? is this a server side operation? or can it be done as an html tag attribute?
what if I only want to set different expiry dates for different images/resources?
Upvotes: 0
Views: 366
Reputation: 11
If your server is Apache, use the ExpiresDefault directive to set an expiration date relative to the current date. This example of the ExpiresDefault directive sets the Expires date 10 years out from the time of the request.
ExpiresDefault "access plus 10 years"
Upvotes: 1