I’m heavily relying on Application Cache for a web application I’m building. I noticed that some of the items that I haven’t explicitly mentioned in the app cache (like a few image files) are being cached by the browser cache instead.
So I’m faced with this question: Should I let the browser cache manage those image files, or should I include them in my cache manifest as well? What are the trade-offs performance wise?
Given the fact you say you rely heavily on Application Cache I would suggest you add those images to the CACHE MANIFEST as well.
The normal browser cache works fine when it comes to speeding up websites assuming the proper caching http headers are sent with those images. However, the browser will also occasionaly check if those files have changed. Especially when the user hits ctrl-f5 (refresh).
Application Cache is way more aggressive when it comes to caching so I would add something like the following to my cache manifest:
(No need for a * behind that path.)
The approach above is probably preferred as it will reduce the risk of linking to a non-existing file and thus rendering the entire cache useless for browser will ignore the cache if any of the files mentioned returns with anything else than a http status code in the 200 range.
Bascially, using Appcache will improve webpage performance and is more reliable than the normal caching browsers already do.