Prevent Gmail from caching images in the newsletter

Since December, Gmail has cached all images.

Now dynamic images, for example. the countdown will not work properly. After the image is cached, the timer will show the time when the image was cached by Google and will not be updated.

I found a fix (and for those who want to help in further explanation): http://blog.movableink.com/real-time-content-and-re-open-tracking-return-to-gmail/

Now my problem is: what should I do?

I tried adding "no-cache" and "max-age = 0" to my header, but Gmail still caches it.

Here is my full title

header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
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' ); 

I also tried to use only "no-cache" and "max-age" and other combinations, nothing works.

?

+4

Source: https://habr.com/ru/post/1533331/


All Articles