Win a copy of Bioshelter Market Garden this week in the Market Garden forum!
  • 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 experiences global resources the cider press projects digital market private forums all forums
this forum made possible by our volunteer staff, including ...
master stewards:
  • James Freyr
  • Nicole Alderman
  • Anne Miller
  • r ranson
  • Mike Jay Haasl
  • Dave Burton
  • Pearl Sutton
  • paul wheaton
  • Joylynn Hardesty
  • Joseph Lofthouse
garden masters:
  • Steve Thorn
  • Dan Boone
  • Carla Burke
  • Kate Downham

Attached Photos don't display in Google Chrome

Posts: 6
Location: Grand Rapids, MI - Zone 5b
  • Mark post as helpful
  • send pies
  • 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:

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
  • 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
forest garden trees books
  • Mark post as helpful
  • send pies
  • 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?
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!