What I am trying to do: A dynamic countdown clock in the body of an email
What is causing me pain: Google's decision to cache images for users of the gmail client
I implemented an email countdown clock for my company last November using this technique:
Countdown Timer Image GIF in Email
Worked like a charm, however in December, a major monkey wrench was thrown by Google when they decided to cache all images for people using Gmail clients.
http://kickdynamic.com/update-on-the-gmail-image-change/
So the problem affects all people on gmail clients that open an email a second time. They will see a cached image. For something like a countdown clock, this would cause a lot of harm.
Admittedly this is somewhat of a blind distress call, but has anyone figured out how to do a email countdown clock that is unaffected by google's image caching?
Without individual tracking, Gmail will cache the image/pixel in your tracking code along with all the other images in your email, and serve the same tracking image for all recipients of your email. This means that only the first open using that tracking code will be recorded and you'll see very few opens for Gmail.
Like other web browsers, Google Chrome features a cache that stores files such as images, scripts and video content from websites that you visit over time.
I had the same problem. So with the following headers, I disabled image caching and it works in Gmail too (therefore Gmail Image Proxy respects the cache headers):
header('Content-Type: image/jpeg');
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");
Credits to this library note.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With