I have the next html code
<script type="text/javascript">
playSound = function(soundUrl) {
var sound = new Audio(soundUrl);
sound.autobuffer = false;
sound.play();
}
</script>
<input type="button" onclick="playSound('audioCaptcha')" value="Play"/>
audioCaptcha is path to my audio storage, which return the unique audio fragment. It works perfectly with Google Chrome and IE, but does not with Mozilla Firefox. Because of strange working of cache I'm getting the old audio fragment every time. Header: "Cache-Control", "private,no-cache,no-store"
As workaround I can use soundUrl with random parameter, e.g. audioCaptcha?12345, but I hope that there are more adequate solution.
Network statistic:

At the next attempts no one request appear and Firefox will use the previous audio fragment. But if the user will wait ~20 second then everything is fine. Looks like that in spite of Cache-Control headers Firefox store it. I want turn off this possibility.
I submitted this issue to Firefox bug tracker and it was confirmed. You can track the status here: https://bugzilla.mozilla.org/show_bug.cgi?id=1129121
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With