Keep the chat conversation divs when you change pages

0

Good community.

I have a chat system, like fb. I am using js, ajax and php. All right up here. It works. The only problem now is that I wanted to save the current chat divs when changing pages.

How can I do this?

    
asked by anonymous 04.02.2016 / 22:22

1 answer

1

Well this is a big problem, I had a similar thing in my case it was an audio player, where I should change pages without pausing the sound, I searched a lot like FRAMES that has become obsolete in HTML5 and IFRAME which is still valid for HTML5, you can start with these two depending on your need to resolve.

But for me the solution I found was to transform my entire system into DOM, ie every piece of the system I turn a block that was dynamically loaded conforms to the need and the player block was kept static.

In my case, I've created a JavaScript framework for this, alias YouTube uses a similar system, I do not know if I've noticed more sometimes the video or contents and comments change out of order, this is because it is done that way each part of the system is an independent block.

They released their framework a while back, they call it Structured Page Fragments, if you feel like it and want to use it, follow the links:

Static: renders everything

Dynamic: element only.

Alias your question is like PHP but the correct one would be HTML / JavaScript. Anyway I hope I have given a light, how to start.

    
05.02.2016 / 04:08