Zounds works with all browsers that support the Web Audio API whist encapsulating that API's asynchronous nature.
The non-minified version has a full set of JSDoc comments.
For it to work you need to download and import the zounds script in your html head:
Give the button the following onclick attribute:
..and that's it. Zounds will cache the sound on first use, any other use of the same URL through Zounds will use that cache.
Add this script in the header:
Give the button the following attribute:
What's more if the sound is still being loaded when this is clicked, it will play as soon as it can. Alternatively there is also a method to register a callback to get zounds to notify you when it's done, so you can hold something up till the sounds are ready.