I'll admit that I don't know how your pages are constructed, and it might not even be possible to fix this problem. However, recently we had an issue where a user was unable to use his userpage because his javascript failed to load properly.

Now, I can understand that in the case of failure on the user's end it is not longer the responsibility of SO to guarantee user experience; however if we look at the cause for poor user experience (in this case) it was because the buttons for question sorting link to the api instead of the page.

These buttons' "click" behavior is overridden to produce the correct ajax call, but in the case of javascript failing to load, or the user right-clicking and selecting open in new tab, the user is redirected to the api directly instead of back to the same page with different sorting.

Steps to reproduce:

  1. Open up any user page
  2. Select the stats tab
  3. Right click on recent and select open in new tab
  4. Notice how the user is directed to: https://meta.stackoverflow.com/api/userquestions.html?userid=137041&page=1&pagesize=10&sort=recent

Expected Behavior: the user should be directed to https://meta.stackoverflow.com/users/137041/tzenes#qpage_1-apage_1-qsort_views-asort_votes

If we look at the javascript in question:

function loadAnswers(b, a) {
    loadUrl("/api/useranswers.html?pagesize=" + answersPageSize + "&userId=" + userId, "#answers-table", b, a)

we see that url for the ajax call is hard coded and thus does not need to be on the <a> tag. This seems to imply this can be easily fixed, but as I said there is no guarantee that page is constructed in such a way it can be fixed.

While SO cannot guarantee user experience in the case of failure, I think they can still improve the user experience with this change, providing some level of disaster recovery.

  • I get fragment of page using "Open in New Tab"... Commented Nov 16, 2010 at 21:40
  • @Jakub does it look like this?
    – tzenes
    Commented Nov 16, 2010 at 23:19
  • Yes (though posting link would not ensure that I know how it looks like in your web browser, or how it looked like at the time of posting). Commented Nov 17, 2010 at 9:06
  • @Jakub the link I presented gives me a fragment of a page as well. This is expected value. Because it is accessing the API directly, you'll notice none of the DOM nodes have CSS in them. This causes the fragment look. What I expect to see is this instead. The issue here is that opening with Open in New Tab produces a fragment instead of the correct page.
    – tzenes
    Commented Nov 17, 2010 at 15:58

2 Answers 2


Starting with the next build, these links will work when opening in a new tab, etc. The user page should function the same as before, but be quite a bit cleaner behind the scenes, enjoy.


I'm bumping this because it's still unresolved and I just had to close my own post as a dupe of this.

Misusing href in this way is ugly and (according to this question) not even necessary for the current code. Opening several pages in new tabs is a habit common to many users, and this breaks that rather ungracefully.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .