Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
How can i check if an audio prototype already exists in cache?

I'm creating a piano project and playing the notes through New Audio. So far so good, the problem is that in every 20 second pause I apparently give when I click on the key again, the audio is inserted back into cache. How can I check if the audio I'm trying to insert is already cached?

example:

var url = 'audio.mp4';

var audio_ = new Audio(url);

onclick = function(){
  
  //It is added back into cache (visible on the inspector's network)
  var newAU_ =  new Audio(url);
  newAU_.play();
}

var url = 'http://www.mairovergara.com/wp-content/uploads/2015/11/3-Loose-tarantula-prompts-Delta-to-call-off-flight.mp3?_=3';

var audio_ = new Audio(url);

onclick = function(){
  //It is added back into cache (visible on the inspector's network)
  var newAU_ =  new Audio(url);
  newAU_.play();

   // Check the inspector's network, reload code snippet balow or wait a few moments and click on the window again and see that the audio is inserted again
}

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!