1

Before I launch my site, I want to get my URL structure set in stone. A large number of my pages have tabs on them, and it's a much better user experience if when changing a tab, I use ajax to get the relevant changes and just update that, rather than updating the whole page.

Should I use the popular method of just updating the hash of the url for ajax tab changes, or should I just use the HTML 5 history API, and let anyone with browsers that don't support it reload the full page? I've heard people say that websites that use hashes and hashbangs are "breaking the web". Using hashes my urls would look like this: example.com/#popular, and using HTML 5 history my urls would look like this: example.com/?tab=popular.

Kyle
  • 20,061
  • 36
  • 105
  • 192

2 Answers2

0

If you want to serve a different page depending on which tab is selected, then use the HTML 5 history approach. Otherwise just update the hash.

Neil
  • 50,855
  • 8
  • 54
  • 69
0

As far as I know, and from my experience it's really six of one and half dozen of another. It's really what you prefer since the end result is the same.

Jeff Langemeier
  • 968
  • 1
  • 10
  • 21