I have an application which uploads images on Akamai. Sometimes it is necessary for us to upload the image with the same name as before. When I do this akamai does not refresh the image on edge servers based on the timestamp. However if I rename the image and upload, my changes are reflected on all Edge servers.
Are there any ESI directives that I can use to ensure that the image is refreshed. I know this will beat the purpose of using the CDN but I require this functionality on selected content.
Any help or direction would be great.
I believe akamai supports If-Modified-Since/ETAGs which should get you what you want. Looking briefly at the documentation i found the following bullets which should help you.
// From Akamai Documenation //
Make sure that your origin server is sending information that indicates the version of the objects so that the Edge server can send a conditional GET request when those objects expire.
Also make sure that your origin server responds properly to these conditional requests, with a 304 Not Modified, if the file has not changed since the time specified or if the ETag value specified still matches.
Cache-Control and Expires headers instruct the browser on whether and how long to cache an object. But when refreshing an expired object, the browser must have information indicating the version of the object that it can send to the server in a conditional GET request.
Version-specific information commonly available to the browser may include (among others):
Last-Modified: If the browser receives a Last-Modified header with the object when caching it, the browser can then send an If-Modified-Since header when refreshing the object, requesting the server to send the object if it has changed since the date specified or respond with a 304 Not Modified response if it has not. Example, as received in the HTTP response: Last-Modified: Fri, 06 Feb 2009 00:08:43 GMT
ETag: An ETag is a unique string that identifies a specific version of the object. If the browser receives an ETag header with the object, it can send an If-None-Match header when refreshing the object, requesting that the server send the object if its current ETag does not match the ETag in the request or respond with a 304 Not Modified response if it does. Example, as received in the HTTP response: ETag: "4514b5-4824-4743e60ff96c0" Make sure that your site is sending information that indicates the version of the objects so that the browser can send a conditional GET request to the server when those objects expire.