user881480
user881480

Reputation: 5423

set expiry date for image or other resources

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

Answers (1)

Admin
Admin

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

Related Questions