1
I am studying about history.pushState and intend to develop a website as a way of study like this http://html5.gingerhost.com/
Regarding jQuery (function to load the new content) I understood perfectly, but I had some doubts:
- There is a difference between
window.history.pushState
or onlyhistory.pushState
? - What is the function of the first attribute (in this case "null")
window.history.pushState(null, "titulo", "novaurl")
? - The second attribute, responsible for the new title, does not work. Proceed with
document.title = "novoTitulo"
is the right way? - In the case of the cited cite as an example,
$.getJSON
to return the requested data, and this part I even understood how to return the PHP data, but, my big doubt is: if I own a large site, how will I return all the data being that I use Templates for PHP and HTML assistance (including database queries, and etc)Is that possible or will I have to change my structure? For, from what I understood the returned data are according to the variablecid
passed through jQuery, and the data is returned with aecho json_encode()...
? - There is even incompatibility of the function
window.history.pushState()
with the IE? - I’ve seen on Github a library called History js.. What does it serve since the history function is already native to browsers (I’m asking because I really couldn’t understand)?
Thank you!
Igor, the subject of getJSON is totally independent of the question of history. I suggest you take that out of the question and post as a separate question.
– bfavaretto
Yes, I know, it turns out that as in the example I quoted this function is used, I wonder if it could be used on large websites, as I mentioned in the question...
– Igor