I’m working on a JS game for Facebook and preloading all images. With chrome, but not yet seen on other browsers, once I open a new tab and surf a few sites chrome will issue fresh GET requests for images already in cache and on screen.
For the sake of testing I put ALL the images, at a 20×20 pixels size, on the side of the game. But if I open a new tab, then surf the web for 5 or so minutes, images that were not in the main game div will get reloaded when they get added to the page again (even though they are sitting on screen in a ‘preloaded’ div).
Rails 3.2 backend on Heroku.
I have tried disabling all Chrome plugins, clearing the cache, and a few different preloader strategies.
resolved
The page was caching fine, the images weren’t. I added the following line to my rails production.rb, and the problem appears fixed.
The page was caching fine, the images weren’t. I added the following line to my rails production.rb, and the problem appears fixed.
Thanks @chris for getting me on the right track!