Hacker News new | past | comments | ask | show | jobs | submit login
Nasty Bug: Safari doesn’t cache stuff. (smugmug.com)
10 points by prakash on April 6, 2008 | hide | past | favorite | 8 comments



curl -I http://www.smugmug.com/test/safari/300k.jpg

  HTTP/1.1 200 OK
  Date: Sun, 06 Apr 2008 15:16:43 GMT
  Server: Apache
  Last-Modified: Mon, 17 Mar 2008 06:17:28 GMT
  ETag: "4c00f-f9632e00"
  Accept-Ranges: bytes
  Content-Length: 311311
  Content-Type: image/jpeg

Bug? Why doesn't he add an Expires header?

http://developer.yahoo.com/performance/rules.html#expires


He wrote, in the comments, that this doesn't fix the problem.

I did a local test with the first photo I came to and found the same:

http://www.flickr.com/photos/pmorgan/32606683/sizes/l/

Even with the Expires header set, it re-requests the entire image.


From the comments on the site:

Don, You aren’t serving the files with any Cache-Control or Expires header ? Does it make any difference if you add those headers

@Yusuf Goolamabbas

Nope, makes no difference. :(


I mirrored the files to my server and Safari reloads the images on restart.

http://3banana.com/pics/cache_test/jpgtest.html

YSlow gives the page a score of 98, so I know the headers are being set properly.

Okay, that is bloody weird.


Nasty? It just reloads it? I fail to see failure to cache as a nasty bug.


Maybe it's a feature? Because we all love waiting for large SWF files to load. It's probably not noticeable if you're just looking at plain HTML like HN, but if you're viewing large photo galleries or downloading many large embedded flash files, it probably becomes a problem. So yes, I think this qualifies as a 'nasty bug'.


If your SWF file is over 200k maybe that's a bad idea to start with.


I'd consider it a nasty bug if I spent significant money on bandwidth.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: