views:

483

answers:

1

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 control 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.

A: 

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.

KKlucznik

related questions