0

Are HTTP Expires and Cache-Control headers honored?

I have a series of icons (weather icons) which may all be the same (like, all day will be sunny).

If I set all of the images' srcs to the same URL (pointing to a server-based file), it appears I am seeing a separate request for each image get to the server, even though they are the same file, and the Expires and Cache-Control identifies these as "good" for a day.

Cache-Control: max-age=86400
Expires: Fri, 18 Nov 2011 13:48:47 GMT

This makes it appear that the framework is not acting as expected concerning HTTP Expires and Cache-Control headers.

Any ideas?

by
3 Replies
  • Unless you have images as data, it is recommended to include them in the widget itself. There is an image cache but is not dependent on the Cache-control headers. You need to appreciate that this is an embedded environment and not all TV models have disk/memory resources like a PC browser has. So, I suggest if the images are supposed to be static and are few in number, then it is just better to keep them locally with the widget.

    Thanks,
    Vivek
    0
  • Thanks for the reply, Vivek.

    I totally understand there must be limitations in that environment.

    It's tricky for us as there are quite a number of weather conditions, and sometimes they are doubled for day and night versions. They are static, but there's a few of them. Very early on we were discouraged from including them in the widget, but it seems like we probably should; for the 960x540 set of icons, we're only talking about 3 Megs.
    0
  • 3MB is definitely on the higher side, since total unzipped widget size is limited to 2MB. In this case, you must only fetch images via the URLs.

    Thanks,
    Vivek
    0

Recent Posts

in General - Yahoo! TV Widgets