Skip to main content
gamedev.net
🔒 Locked

[web] force cache?

Started by EvilCrap Mar 18, 2005 at 8:44 AM 1 replies 650+ views
Original Post
EvilCrap
EvilCrap
ive got an html and &#106avascript page that displays an animation by loading a series of images and displaying them in sequence. Every few minutes, the page gets reloaded with an image array that is a bit different. to increase the page's load speed, it should only load images that are new, while retreiving others from the cache. this speed issue is a concern because the page must support modem users as best as possible. i am wondering how to interact with the cache, to specify what to save and discard, and when.
Kippesoep
Kippesoep
AFAIK, HTML/&#106avascript doesn't allow for this. You can control things using the web server or server-side scripting language, though. It can alter the HTTP headers which control caching.
Kippesoep
konForce
konForce
If minimizing bandwidth is a concern, I'd use &#106avascript to dynamically alter the page instead of reloading the page. <br><br>One way to do this would be to generate a JS XMLHttpRequest that returns an XML document. The XML document could contain the information needed (which images to change, etc.)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.