开发者

cache mpeg files on page load, html + php

I have a page with an ajax page prowser. On two slides an embedded player will play an mpeg or flv video file.

First time the page is viewed the file will be loaded an开发者_如何学Pythond on slow internet connections it will stop-start since is is beeing showen and loaded at the same time.

Can I auto-cache the two files on page load so that the are cached and ready when the visitor are ready to watch them?

Br. Anders


First of all you should take care the HTTP headers for cache control. Make sure the static files are being served with following header (use FireBug to verify):

Cache-Control: max-age=3600

However, you do not have full control over caching, it's up to the web-browser to cache large files or not.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜