Real-Time Content and Re-Open Tracking Return to Gmail

Sunday, March 9th, 2014

Gmail image caching updateBack in December, Gmail made a major overhaul to the way it processes email. Images started being proxied through Gmail’s servers, which changed the way that images are cached. As a result, images could now be immediately displayed to recipients (no more “click here to view images from this sender”), but at the same time, marketers lost the ability to track email re-opens and the ability to serve relevant, real-time content upon re-open was limited.

What Happened at Gmail?

Image caching on the web and in email is controlled through headers, which are sent back with images. The header informs the web browser or email client how long and under which conditions the image should be re-used before making another request to the server. In its initial rollout in December, Gmail respected the caching headers sent from the original server, but always served images to the user with instructions to re-use the same image for 24 hours.

Due to the 24-hour caching header, web browsers would see real-time content initially but not on subsequent re-opens until one day later. Since open tracking also relies on images, the initial opens registered properly but re-opens were cached and could not be tracked. There were some reported workarounds for re-open tracking, but they involved sending malformed data to the Gmail proxy and were not guaranteed to work.

The Return of Real-Time Content and Re-Open Tracking

Last week, the Movable Ink team noticed that Gmail had begun deploying updates to address the issues caused by its 24-hour caching. The cache still exists, but it is now overridable if you pass a no-cache header (example below).

Content-Type: image/png
Cache-Control: no-cache, max-age=0

This means that re-open tracking now works as it did before December’s changes. In addition, these changes fix a long-standing issue of Gmail temporarily caching entire emails when navigating between emails in Gmail. When using Movable Ink, these updates mean that whenever you open an email in Gmail, you can be sure that you are seeing the most up-to-date, real-time content on every open and re-open.

3 thoughts on “Real-Time Content and Re-Open Tracking Return to Gmail”

  1. Great article.
    Do you think it’s possible to only set it so it’s only your dynamic and tracking images that don’t cache?

    I’m assuming this can be (sort of) done by setting no cache on image/gif but leaving it on image/png and image/jpg and using the corresponding formats.

  2. Wow thanks for this.

    Can you tell me where I would add this?

    HTTP 200 OK
    Content-Type: image/png
    Cache-Control: no-cache, max-age=0

    Would I place this within the tag?

    Also, if we have different image formats, such as GIF and JPG, would this be the correct line?

    HTTP 200 OK
    Content-Type: image/png
    Content-Type: image/jpg
    Content-Type: image/gif
    Cache-Control: no-cache, max-age=0


  3. Hey thanks for your solution! I’ve got the same problem, but although I’m sending a no-cache header, gmail is caching my images and doesn’t refresh my timer/dynamic content properly.

    Here is my complete header:

    header(‘Content-Type: image/png’);
    header( ‘Expires: Sat, 26 Jul 1997 05:00:00 GMT’ );
    header( ‘Last-Modified: ‘ . gmdate( ‘D, d M Y H:i:s’ ) . ‘ GMT’, true, 200 );
    header( ‘Cache-Control: no-store, no-cache, must-revalidate, max-age=0′ );
    header( ‘Cache-Control: post-check=0, pre-check=0′, false );
    header( ‘Pragma: no-cache’ );

    Am I missing something? Can you give a complete example, please?


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>