What if the user presses the refresh button? What else would i need to do for the user to be able to refresh to the current content they are on, rather than the whole page. if you press the refresh button on what you currently have, it will give an error page. Anyone know a simple way out of this?
You don't how how much this tutorial worth for me, i was searching this for years.. and a word came up History api and here i did what you did, and done! thanks a ton
thanks alot for all your free lectures. you have played a very great role in my life . Alex the great. only GOD can continue to reward you. stay blessed
Good for the basics but would be better in combination with .htaccess and rewrite rules -> the content could be loaded dynamically from a db and you don't need to link to the content.php files manually if you add a new page
First: Thank you. Then: Why is there "no way" 15:10 of reliably getting the href…? It is relative and it is set by you, also there is nothing to split off of cat.php (which is href)…..?
18 responses to “JavaScript History API Basics”
What if the user presses the refresh button? What else would i need to do for the user to be able to refresh to the current content they are on, rather than the whole page. if you press the refresh button on what you currently have, it will give an error page. Anyone know a simple way out of this?
Perfect introduction, thx a lot
Do you have the source code? I followed the tutorial but am getting undefined?=229192
why not use history.pushState(href, null, href); and later retrieve it from popstate's e.state instead of manipulating and parsing location.pathname?
You don't how how much this tutorial worth for me, i was searching this for years.. and a word came up History api and here i did what you did, and done! thanks a ton
Great intro. Thanks!
Dude thanks very much!!!!
Amazing explanation, thank you!
Thank you SO much for this tutorial. Super helpful!!
Tu eres el mejor.
Works with PERFECTION!!!
Thanks 🙂
thanks alot for all your free lectures. you have played a very great role in my life . Alex the great. only GOD can continue to reward you. stay blessed
Good for the basics but would be better in combination with .htaccess and rewrite rules
-> the content could be loaded dynamically from a db
and you don't need to link to the content.php files manually if you add a new page
First: Thank you.
Then: Why is there "no way" 15:10 of reliably getting the href…? It is relative and it is set by you, also there is nothing to split off of cat.php (which is href)…..?
Great Tut, Google is using this feature too in their translations page
https://translate.google.com
JavaScript History API Basics
your work keeps me motivated to work on big projects !! thank you for your great videos !! keep it up.
Can't we use "return false;" instead of "e.preventDefault();"?
Never mind lol http://stackoverflow.com/questions/1357118/event-preventdefault-vs-return-false