Prevent Audio Player from refreshing while page change

I’m creating a website in wordpress. I have a music player in it as its for a music artist. But I want the player to continue playing while the users move through the website. I dont want to use iframe as i want the url updated so the page can be bookmarked. Or is there any way to update the url and use iframe?

Related posts

Leave a Reply

3 comments

  1. Somebody on the WordPress forum asked the same question.

    The best way (technically) to do this is indeed to use a CMS that supports surfing the site without page-refreshes, so using AJAX, as @jonny suggested.

    jango.com seems to do this as does another site I can’t remember.

    If you load every page via AJAX, there’s probably gonna be a drawback if you care about search-ranking .

  2. any way to update the url and use iframe

    maybe you need something like this

    main.html

    <script type="text/javascript">
        function change_parent_url(url)
        {
        document.location=url;
        }       
    </script>
    

    player.html

     after each click (how?): parent.change_parent_url (new_url_here);
    

    I am not sure, but I’ve seen similar, iframe approach on weborama.ru:

    look for window.location=, maybe it helps

  3. If you change the URL fragment (the part after the #) on each page change, the URL in the address bar can always be bookmarked. If you do this with a frame (probably the easiest way), every page load would update the URL fragment of the parent document. If an incoming link has this fragment set you open the frame not with the homepage, but with the requested content page.