搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Mozilla doesn't refresh the audio tag file. Mozilla's faulty audio

more options
<div class="formRow">
                <div class="field">
                    <img style="margin-left:91px; margin-top:-6px;" class="image" src="http:www.xyz.com/captchaServlet"> 
         //the above line calls a servlet for the image       

                </div>
                </div></br>
                 <div class="formRow">
                      <div class="field">
                      <audio style="margin-left:91px;" controls="controls">
      <source  src="http:www.xyz.com/getSound" type="audio/wav">
//the above line calls servlet for audio file
    Your browser does not support this audio format.
    </audio>
                      </div>
             </div>

// in the above code whenever I refresh the page a new image is loaded by calling the servlet but a new audio is not loaded, the call is not made to the sound servlet.
<pre><nowiki><div class="formRow"> <div class="field"> <img style="margin-left:91px; margin-top:-6px;" class="image" src="http:www.xyz.com/captchaServlet"> //the above line calls a servlet for the image </div> </div></br> <div class="formRow"> <div class="field"> <audio style="margin-left:91px;" controls="controls"> <source src="http:www.xyz.com/getSound" type="audio/wav"> //the above line calls servlet for audio file Your browser does not support this audio format. </audio> </div> </div> // in the above code whenever I refresh the page a new image is loaded by calling the servlet but a new audio is not loaded, the call is not made to the sound servlet. </nowiki></pre>

由cor-el于修改

所有回复 (5)

more options

It is usually best to add a random part to such an URL like http:www.xyz.com/captchaServlet?xxxxxx (e.g. the current time in epoch format) to make sure that Firefox doesn't use the previous image as stored in the cache, but requests a new image from the server.

more options

I have tried that already. But it still doesnt work. I dont know what to do. My whole project is on hold because of this bug!!

more options

And its not the image its the audio tag that doesn't get refreshed. new image gets called everytime

more options

Then try to d the same with the audio source src attribute.

A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.

more options

I have done it to audio src attribute only. Image attribute does not need randomly generated URL.