How does twitter server get to know single tweet ID from URL fragment segment?
- by Morgan Cheng
Each tweet has a single URL such as http://twitter.com/#!/DeliciousHot/status/23189589820702720. The tweet identification (/DeliciousHot/status/23189589820702720) is in the URL fragment segment which is not actually sent to server.
Originally, I thought it works this way:
The URL response doesn't have this tweet specific info. It is JavaScript module that extracts tweet id from current browser URL and fetch tweet payload with AJAX. The page content is then updated with the tweet payload.
To my surprise, it is doesn't work this way!
With Firebug, you can view that response of http://twitter.com/#!/DeliciousHot/status/23189589820702720 has tweet payload "10 Signs of a True Gentleman" text in inline JavaScript. The tweet payload is not fetched by another AJAX.
So, how does Twitter server get to know the expected tweet ID even it is in URL fragment segment?