0

Possible Duplicate:
How AJAX is done in github source browse?

I have an application that basically have 2 main pages:

  1. Main page with a list of applications (like an inbox list)
  2. A single application page with lot's of things to do there (like a single message)

I have 2 concerns that I don't understand how to solve:

  1. The browser's URL : on the first page it will be www.foobar.com/inbox and on the second page it will be www.foobar.com/inbox?app=1234. How do I do it without really going to another page or refreshing the page
  2. the browser back/forward button - how do I manipulate them so if I am on a single page and I push "back" I go back to inbox and not to the previous page? I read some discussions about it and couldn't understand where to start from.
Community
  • 1
  • 1
Alon
  • 7,618
  • 18
  • 61
  • 99

1 Answers1

0

Look at gmail url and you will see # (hash), like:

document.location.hash;

There are many plugins, you can start from here:

Ben Alman - jQuery hashchange event

webdeveloper
  • 17,174
  • 3
  • 48
  • 47
  • This is not a good approach to the problem and [introduces problems of its own](http://isolani.co.uk/blog/javascript/BreakingTheWebWithHashBangs), so many that [Twitter stopped using them](http://engineering.twitter.com/2012/05/improving-performance-on-twittercom.html). – Quentin Oct 16 '12 at 08:41
  • @Quentin Thanks, I just answer question how it works. I think, he will make choice himself. – webdeveloper Oct 16 '12 at 08:51