I didn't get any responses on the other forum, unfortunately.
Prevent Caching of Specific Files in IIS 10--Help with Code in web.config
I'm running a streaming server now, using nginx to ingest from OBS studio and write an .m3u8 and .ts files to IIS server directory. I've added MIME type .m3u8 to get it to work.
Initially I found that browser caching was preventing the stream from playing anything but the same 8-second segment. I was able to disable all caching with line 6 below from sample file I found online. However, I'd prefer not to disable ALL caching if possible.
I tried adding in line 3, 4 and 5 and changed the .jpg to my stream1.m3u8 file that I want to not be cached, but I got a 500 server error when I did that.
1 |
<configuration> |
|---|
2 |
... |
|||
|---|---|---|---|---|
| --- | --- | 4 |
<system.webServer> |
|
| --- | --- | 5 |
<staticContent> |
|
| --- | --- | 6 |
<clientCache cacheControlMode="DisableCache" /> |
|
| --- | --- | 7 |
</staticContent> |
|
| --- | --- | 8 |
</system.webServer> |
|
| --- | --- | 9 |
</location> |
|
| --- | --- | 10 |
</configuration> |
|
| --- | --- |
There is another way supposedly to do this within IIS using the Output Caching menu and adding a rule to not cache specific files, but this does not work. It serves the stale video again. The only method that works so far, is the web.config edit disabling ALL caching (omitting lines 3,4,5).
Have I implemented either of these incorrectly?
Is it possible to stop the caching of .m3u8 file and .ts files without disabling ALL caching?
Windows for home | Windows 10 | Settings
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
2 answers
Sort by: Most helpful
-
Anonymous
2023-10-29T04:44:18+00:00 -
Anonymous
2023-10-29T03:35:11+00:00 Hello, M A Weiss
Welcome to Microsoft Community.
I apologize, but your inquiry is outside the purview of the community's assistance. Nevertheless, I've observed that you have already posed the same question in another forum:
Prevent Caching of Specific Files in IIS 10--Help with Code in web.config - Microsoft Community Hub
The Community Hub is primarily focused on engaging in more advanced technical discussions, thus it would be advisable for you to await potential solutions from fellow members.
Please note that your question will continue to be accessible on Microsoft Community, allowing others to contribute to the ongoing discussion.
Thanks for your understanding.
Yuhao Li
Microsoft Community Technical Support