Load page without loading music player

Asked

Viewed 529 times

2

I’m making a website I have a music player on HTML5, only that every time I change the page the player loads again. In my research it seems that there are all solutions or AJAX or IFRAME. IFRAME say is not very recommended so I thought to do with AJAX, but since I don’t know how to use AJAX, so I went to Goole, only all I found was how to refresh a content without giving the page. What I want is otherwise the whole page can reload but the player does not, so keep playing the songs.

I found this post Ajax opening content without refresh but didn’t answer what I wanted

NOTE: The player is inside a php include, has problem that?

2 answers

1

Oops, in your case you would have to do an ajax that would give the refresh on the page less in the player. Only solution.

If pressing F5 has no way to escape, you could use something with lazyload for the player but then it would be the opposite, it would load the page and the player would be depending on a user action to click how to click a button for example.

  • So what if I put all the content of the site on the same page and made the menu in ajax as I would do this?

  • is complicated, the ideal roughly would be to subdivide into Ivs and load the contents of each individually by ajax, to facilitate its layout. Let’s say you’re in the middle, then it would be 4 "Divs" up left and right, then you would make your php server respond to an ajax request by returning the contents of these Divs.

  • War then leaves because I don’t know ajax and I don’t have time to learn now because I need to deliver the project. Still if I had an example on the Internet but the most I found was this site made in bootstrap http://www.thiagobrava.com.br/

  • for q vc want the user to browse the site without the music stop right? in this case the ideal is an iframe even =b

0

It’s a mix of loading the new content via Ajax and using an HTML5 API called History.

This similar question in Soen will give you a North to follow.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.