Hacker News new | past | comments | ask | show | jobs | submit login

> I bet someone does it on their live site.

I doubt it, as this method breaks forward/back functionality, thus probably breaking most sites.

Having said that, for all links, you could do a further re-write using the history API, before allowing the redirect to take place. I guess that would actually make it usable even if, as you say, it's futile in the end.




Many sites (hi, Twitter; #! you, too!) happily break the back button. It is a standard technique to "boost" engagement and "reduce" bounce rate. Seems spiritually inline line with this view-source gimmick.


There is a problem, of course. Going to the new url fails to render the site, so view source won't work but neither will bookmarks. And you DON'T want to prevent bookmarking. But good to know this works.


Well, it's not really the same.

On Twitter if I'm viewing an individual tweet page, and then click onto the authors profile page, and then click "back" in my browser, I will not be redirected to a different page altogether like in the OP's demo.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: