How to play a background music continuously while browsing through the website

When you set the background music for a webpage, it will get restart once the page post backs. If you need the background music to be play continuously even though the page post backs, you have two options.

1. Play the background music in a different window. You can achieve this by having a popup playing the background music once the user enter to the website. This is not a good option because it will require two windows for a one website. And this will not work if the user has disabled the popups in their browser.

2. Other option is by using iframes. Load the background music into a one iframe and make it consistent across pages. Have a seperate iframe to load the site pages. So the iframe which contains the background music won't get reloaded when there is a postback.

Having said that, background music is not very handy when it comes to user experience. It’s a really annoying thing. Background music sucks big time specially when there is no way to stop it! Just think, what if your users open the website while they are at a hospital etc.?

No comments: