What makes a webpage's sound continue after the page is closed?

Some websites that have sound/music keep the sound running even after the web browser is closed on iPad. Some other websites stop the sound when the page is closed. I suppose there must be some coding within the HTML to control this. How is this done?


Solution 1:

As you may see, websites that keep the music running appear as the music app (here on iOS 6)

enter image description here

It uses the HTML5 audio feature. In the website you gave (coffitivity.com). They use the JPlayer plugin for jquery to use the HTML5 audio API.

Solution 2:

I was able to get this to stop on my iPad Air by going to Settings->General->Multitasking and turning off Persistent Video Overlay. (I did leave multitasking turned on.)