5 ms·
Ask HN: How and why does Twitter trap its users?
As I'm sure many of you have noticed, when you click on a link to Twitter you are unable to navigate back to the page that gave the link. That's because Twitter somehow disallows you from doing so when pressing the back button and instead keeps you on twitter.com.
For example, look at this article: http://www.wired.com/epicenter/2011/01/twitter-let-the-tweets-flow/
Then click on the link at the top of the 3rd paragraph that says "#jan25 movement". You should not be able to return to the Wired article unless you click the back button a few times repeatedly. Otherwise, you will alternate between the url's https://twitter.com/#, https://twitter.com/search/%2523jan25#, and https://twitter.com/search/%2523jan25#search?q=%2523jan25. This seems to always be the case when an article links to a Twitter page without opening a new window/tab.
As this is obviously quite frustrating, I was wondering why they have chosen to do it. It'd also be great to hear a technical answer on how they do it if it's not too complicated.
- solipsist 16y agoA couple more details from some experiments I've done: • This behavior does not appear in Google Chrome • It does appear in Safari 5.0.3, but only when you're logged out of Twitter
- benjoffe 16y agoThis problem occurs when redirects are created in javascript by assigning a url to the location object. If instead they use location.replace(href); then no extra item will appear in the history stack and the back button will work as intended.
- atgm 16y agoI passed this on to a friend who works at Twitter, who e-mailed it up the chain... so hopefully we'll get a response at some point.
- solipsist 16y agoWow! Thank you for doing this. I'm really looking forward to hearing if they have something to say. Please keep us updated with the info that you're allowed to disclose.
- atgm 16y agoNo problem, but don't get your hopes up! We'll see if anything comes back. Maybe someone from Twitter will post here...
- dacort 16y agoI can click back just fine on Chrome... Wikipedia annoys me like this with the mobile web client. If I click through a Google result to wikipedia, it redirects me to m.wikipedia.com and I have to hit back twice to get to Google.
- solipsist 16y agoI'm running Safari 4, just for your information
- dacort 16y agoOdd, Safari 5.0.3 (6533.19.4) works fine for me.
- solipsist 16y agoMy mistake, I have Safari 5.0.3 as well. However, I've done some more testing and it seems as if the "bug" only occurs when you're logged out of Twitter. Let me know if that's the same for you.
- dacort 16y agoAh yes, I can confirm that. It's totally hosed when you're logged out since it redirects to the logged-out search page, instead of the integrated one when you're logged in. It also breaks the parameter encoding when it redirects. Nice.