Proper Cookie Usage for Four Background PNG Images

So far, it looks like I get an A on everything, other than image compression, which I’m sure 95% of the world just can’t help unless you want heavily pixilated images. I even use Yahoo! Smushit.
In any-case, that’s not the issue.
My main issue is with ‘Proper Cookie Usage’ for 4 of my background PNG images. I’m using a combination of MAXCDN, W# Total Cache, and a couple .htaccess rules I will provide below.
Thanks in advance for any help

<FilesMatch \.(jpg|jpeg|png|gif|css|js|zip|rar|exe|ttf|eot|svg)$"> ExpiresDefault A31536000 </FilesMatch> <IfModule mod_setenvif.c> <IfModule mod_headers.c> <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$"> SetEnvIf Origin ":" IS_CORS Header set Access-Control-Allow-Origin "*" env=IS_CORS </FilesMatch> </IfModule> </IfModule> <IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch> </IfModule>

Actually, your image compression can be improved without “heavily pixelated” images. Yahoo! Smushit just does lossless optimizations and strips out meta data but it will not tell you that your jpeg’s were saved at too high of a quality level. JpegMini is the only optimization service that I’m aware of that does lossy re-compression.

WPT’s image compression check re-compresses jpeg’s at a quality level of 85 which is super-conservative. You can usually do a lot better than the results from the optimization check if you hand-tune the compression on each image in Gimp or something similar.

For the cookie issue, it is just because you are serving the images from the same domain as your main site and cookies are being set on the domain. If you REALLY want to serve the images from a clean domain then you will need something like It is a micro-optimization though and it will actually make performance a bit worse in your case (the extra DNS lookup will take longer than you would gain).

Thanks pmeenan,

I thought I was taking care of that by using a maxcdn sub-domain
Also, How would you recommend i resample my images using ‘JpegMini’?

Since your main site is a naked domain (no www), the cookie gets set at the level and will propagate to any and all sub-domains.

JpegMini is a website/service -

You can upload your images much like SmushIt. You can also just change the settings when you export from photoshop or whatever tool you use to save them (best if you can work from uncompressed originals).