Question

I want to create something similar to: http://www.atlassian.com/software/jira/overview

(See the URLs changing on click of tabs on feature tour section)

I know this can be achieved with HTML5's history API, my question is : do I need to create multiple copies of same page, so that this works fine when the URL is entered directly in address bar, or is there any other possible way like URL rewriting or something to achieve this?

Was it helpful?

Solution

HTML5 History API is for adding items in browser history when it is necessary but when we don't do usual http requests. In the example there are usual http requests (not ajax), when browser makes such requests it adds items in browser history.

  1. You may do separate page for each tab
  2. You may have only one page and use HTML5 History API (pushState, popState etc.), but if you want "this works fine when URL is entered directly in address bar", then you should add the page anyway.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top