How to test whether an image is already in cache? [migrated]
- by Evik James
I am developing a web site that has a lot of large, high-quality images on the home page. On the home page, there is an image carousel that pulls ten high quality images from a database. The images can be 1 meg each. The carousel images aren't my problem (right now), but it has something to do with it.
The problem I am trying to address right now is that I use a high quality background image that I want to continue using, it's about 180k. If I have the background in cache on the home page, I want to use it. If not, then I don't want to use it on the home page. I'll load it from a different page. When the user returns to the home page, and the background image is in cache, I want to use it.
Can I test whether an image is already in cache and if so, dynamically load or NOT load based on that?
You can see the home page here:
http://flyingpiston2012-com.securec37.ezhostingserver.com/