Current time: 11-20-2019, 10:29 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Proper Cookie Usage for Four Background PNG Images
11-02-2012, 12:10 AM
Post: #1
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
http://www.webpagetest.org/result/121101...ic_content
Code:
<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>
Find all posts by this user
Quote this message in a reply
11-02-2012, 12:41 AM
Post: #2
RE: Proper Cookie Usage for Four Background PNG Images
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 http://www.angsherpaimages.com. 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).
Visit this user's website Find all posts by this user
Quote this message in a reply
11-02-2012, 01:45 AM
Post: #3
RE: Proper Cookie Usage for Four Background PNG Images
(11-02-2012 12:41 AM)pmeenan Wrote:  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 http://www.angsherpaimages.com. 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'?
Find all posts by this user
Quote this message in a reply
11-02-2012, 03:22 AM
Post: #4
RE: Proper Cookie Usage for Four Background PNG Images
Since your main site is a naked domain (no www), the cookie gets set at the varmag.com level and will propagate to any and all sub-domains.

JpegMini is a website/service - http://www.jpegmini.com/

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).
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)