I am using the HTML5 Audio element inside my HTML file.
Trying many methods,I just cannot manage to replace the audio file via AJAX, it still returns the same audiofile.
<source src="test.ogg" type="audio/ogg">
If you're not going to change the name of the file but keep updating it then you need to add immediate
Expires HTTP headers to the response on the server side. Exactly how you do this depends on which server you're using. Common ones include Apache and IIS.
However, it would be easier, and also better practice, to let the browser cache the audio and just give each new file a different name.