• Post Reply Bookmark Topic Watch Topic
  • New Topic
permaculture forums growies critters building homesteading energy monies kitchen purity ungarbage community wilderness fiber arts art permaculture artisans regional education skip experiences global resources cider press projects digital market permies.com pie forums private forums all forums
this forum made possible by our volunteer staff, including ...
master stewards:
  • Nancy Reading
  • Carla Burke
  • r ranson
  • John F Dean
  • paul wheaton
  • Pearl Sutton
stewards:
  • Jay Angler
  • Liv Smith
  • Leigh Tate
master gardeners:
  • Christopher Weeks
  • Timothy Norton
gardeners:
  • thomas rubino
  • Jeremy VanGelder
  • Maieshe Ljin

Attached Photos don't display in Google Chrome

 
Posts: 6
Location: Grand Rapids, MI - Zone 5b
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy folks, I don't see the attached images in Google Chrome when I view forum posts.  If I use Firefox, I can see the images.  It looks like the reason is that the images aren't complying with the HTTP spec and Firefox is a little more lenient than Google Chrome.

Here's what I found while testing this image:

https://permies.com/permaculture-images/2101_804/sausage_patricia.jpg

The problem lies in two response headers that the server responds with:


The problem is that the content length of the response when gzipped is actually 127404 bytes, but the content-length header is always sending down the length of the non-gzipped image.  So Google Chrome (and probably other browers) are expecting more data than the server sends so they think the request got interrupted and don't display the image.

I don't know the details of the site, but often there's not a huge gain from gzipping images like jpg and png since they are already compressed.  It may be okay to disable gzip compression for those file types.  Otherwise, the fix would be to make sure the Content-Length header matches that actual content length that the server is responding with (127404 in this case).

Here's how I tested this on Linux:




View the size of /tmp/foo.jpg.gz (127404 bytes), then view the first few lines in /tmp/foo.txt to see that it is sending a content-length of 127515 bytes which is larger than the size of /tmp/foo.jpg.gz.  If you gunzip /tmp/foo.jpg.gz you'll see that it now matches the incorrect content-length header.
 
                                
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for posting this! I joined the site today and was wondering why I can't see any images. I'm also using Chrome.
 
Posts: 127
3
2
forest garden trees books
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having the same problem using Firefox 3.6.21, as well as Chrome.
Would it normally get solved if I upgrade Firefox to a more recent version?
gift
 
Companion Planting Guide by World Permaculture Association
will be released to subscribers in: soon!
reply
    Bookmark Topic Watch Topic
  • New Topic