How does twitter server get to know single tweet ID from URL fragment segment?
Posted
by
Morgan Cheng
on Stack Overflow
See other posts from Stack Overflow
or by Morgan Cheng
Published on 2011-01-07T02:52:02Z
Indexed on
2011/01/07
2:53 UTC
Read the original article
Hit count: 284
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?
© Stack Overflow or respective owner