I have a nice little website built with Drupal 7. It's very basic, nothing crazy going on.

The client is demanding there be background music playing on the site. I have pleaded with them not to do this, but they are insistent and they are also signing the checks. :)

What is the best way to add background music to an existing Drupal 7 site that won't stop playing between pages? For any given solution what are the consequences to search engine friendliness and impact in general to the structure of Drupal?

Looking only for solutions to the music problem as not having music on the site isn't an option here.

  • This question seriously needs an update — having persistent audio players for music sites is a pretty common thing now. See: themusicninja.com
    – aendra
    Apr 5, 2013 at 17:51

4 Answers 4


I'm looking at doing the same thing for a band's website where the music can keep playing even when switching pages. AJAX is definitely the way to go here.

Check out the pjax for Drupal module.

pjax is a jQuery plugin that loads new content into the current page without a full page load. This is usually quicker and smoother than a full page reload, because Drupal only has to deliver the main page content and not the full page – and the browser only has to redraw a smaller amount of markup.

In addition to this, pjax updates the page URL with the proper page path using HTML5 pushState – not with #url-fragments that are commonly used with ajax-loaded content. It also updates the page title with the title of the loaded page. In other words, it has all of the benefits of standard page loads (permalinks, SEO), while taking advantage of partial page loads in the browser.


If you want the music to continue playing even while you go from one page to another, you'll have to make the site so that all pages are loaded with AJAX, or in frames. With regular page loading, the music will be interrupted between each page.

As far as a player to use, I haven't tried anything, but this one looks pretty good to me: http://www.cincopa.com/media-platform/services/add-music-to-website


From a Google/Search perspective, the frames idea is a bad one. Has the client also considered people accessing via Mobile platform? Also an issue.

I hate pop-unders, but in this case, a pop under spawning the player might also be the way to go...then do mobile agent detection, and kill the spawn for that platform.


This is an old question but some may still stumble upon it so here is the solution:

Combine two modules, https://drupal.org/project/ajax_pages and https://drupal.org/project/background_audio

This allows a user to browse the site (visiting different pages) and have an audio file continuously playing (without interruption).

In essence you are using ajax to have constant regions which do not change when a page is loaded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.