开发者

HTTP/1.1 Cache-Control no-cache problem

I do not want my Java SWT application to cache temporary internet files. Currently I am dealing with IE (because SWT uses the native browser), and the browser cannot be changed.

The "Cache-Control: no-cache" seems to work fine for every file type I display, except wmv. My "Expires" is set to 0. I have tried all kinds of cache cont开发者_JAVA技巧rol configs with no-cache (no go for wmv), no-store (no go for wmv), private (allows wmv to play but cahces temp files), max-age (no effect), etc. The wmv file comes up with only the stop button clickable. But hitting stop and play do nothing.

The browser displays media files with WMP, so I do not understand why wmv will not play but mp3/mpg work fine (which are also played in WMP).

Is there something I am missing in my response header that will force the temp files to not cache and will let wmv play? I cannot find anything online about there being issues with no-cache and wmv.


There was a slight formatting issue with my response header in that it did not end with two "\r\n" strings. My cache-control header only had "\n" at the end of the string and a utility tool called Fiddler reported this error in formatting.

The wmv does now work and nothing is cahced for any file type.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜