Retrieving expiration of response

Top  Previous  Next

To retrieve the expiration date of HttpResponse invoke the HttpResponse#getExpires method. The expiration date of an HttpResponse is contained in the Expires header of the HttpResponse. This will return the date that the content should be expired from the clients cache if content caching is enabled. If this Expires header is not included in the HttpResponse then the value returned will be null.

 

Example

 

// get content expiration date

Date expires = response.getExpires();





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC