0

I've looked in to this for some time and I've seen other threads. on this site, but I honestly do not know what I'm doing.

On darrenbachan.com I want it where when I click on a project the URL changes and back/forward works in the browser.

I've looked at these: Updating address bar with new URL without hash or reloading the page

How can I change the page URL without refreshing the page?

http://spoiledmilk.com/blog/html5-changing-the-browser-url-without-refreshing-page/

I just don't know what I'm looking at, my Javascript skills are basically non-existent. Most of what's in my .js file is a friend helping me.

I was hoping someone could push me in to the right direction...

Community
  • 1
  • 1
Darren
  • 177
  • 2
  • 9
  • This https://www.youtube.com/watch?v=qvHecQOiu8g is a good starting point although you should learn some JS I guess. – fnune Jan 13 '16 at 20:38
  • 1
    Those links you posted are about as good as it gets - they're very clear. You obviously need to know *some* javascript to use them. I guess a good place to get started to to start learning the language – Nick Zuber Jan 13 '16 at 20:44
  • Just suggestion open this url in private window – devpro Jan 13 '16 at 20:50
  • Possible duplicate of [Modify the URL without reloading the page](http://stackoverflow.com/questions/824349/modify-the-url-without-reloading-the-page) – pomeh Jan 13 '16 at 20:54
  • As said earlier, your links are OK, you should try to understand their content, here's another one for you: http://html5doctor.com/history-api/. Also, you should try to learn some JS and web concepts first. But be aware that HTML5 History API can be quite tricky to understand and to get right, even for exeperienced developers, and chances are you could go without it ;) – pomeh Jan 13 '16 at 21:03
  • @pomeh Yeah, this is very challenging for me. I was hoping something like this would be much more simple to figure out. – Darren Jan 13 '16 at 21:05
  • window.history.pushState(“object or string”, “Title”, “/new-url”); I wasn't sure if an object could be a class but I treated it like it was, I changed the url here but when I loaded my site the entire url changed right away vs. waiting for the project associated with the class to be clicked. Eventually this 404'd my site. – Darren Jan 13 '16 at 21:10
  • @pomeh I saw that url you sent too, there's multiple solutions it seems, like I don't know which one is the best to use... – Darren Jan 13 '16 at 21:12
  • @Darren there are not so many options, you should look after "HTML5 History Api" solution, the best one IMHO. Another good link: https://css-tricks.com/using-the-html5-history-api/ (css tricks is a good website). This is challenging but way not impossible :) – pomeh Jan 13 '16 at 21:23
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/100615/discussion-between-darren-and-pomeh). – Darren Jan 13 '16 at 21:39

0 Answers0