Javascript Links

One thing I find very annoying on web pages is when I click a link to open it in a new tab (middle button), and I find it was a JavaScript link and so nothing happens!

The culprit in question

For example, go to http://ur1.ca/049e3 (it was the first one I could find but it is certainly not unique) and middle click on the screen shot of the Ubuntu Website. The desired behavior is to have that image open in a new tab. What actually happens, is that you get a blank page and no image.

jQuery

This problem is down to the developers. Links with href attributes of ‘javascript:doSomething()’ are old and obsolete ways of working. With new JavaScript libraries such as jQuery, you can set a href as something completely different and still have ‘doSomething()’ run when it is clicked.

What the website mentioned above should have, is the href set to the URL of the image, so that when I middle click the link, the image opens up in a new tab, however it should have a bit of jQuery along the lines of:


$("a.image").click( function(e) {
e.preventDefault();
doSomething();
}

It isn’t that hard and it would save us all of this aggravation…

Rant about new Ubuntu website

Hi guys, as you know the new Ubuntu website has just been released and whilst I am glad it is finally out, I do have some issues with it (I have to be brief because of lack of time).

Screenshot of New Ubuntu Homepage

  1. Size
    Being a website that will be well-visited, I have no idea why there are 32! external CSS files and 16! external javascript files. It also fails to use gzip compression and a whole host of other factors that decrease download amount and time. I am sorry Canonical but this just isn’t good.
  2. Layout
    I don’t know what it is, but on pages like these http://www.ubuntu.com/desktop my eyes just start crying. I cannot see clearly any layout and things like padding etc. are all over the place
  3. Fonts
    Not only do the layout flaws not help, but the font size etc. are all over the place. On a page like this http://www.ubuntu.com/community the sizes have no relationship to the order of the page and make it harder to read again.

Having said this, I think the new Ubuntu website (and Canonical’s new website) is a lot better than the old one (I especially like the new theme) however I am slightly disappointed about the three points above. The points above are simple points that make the site look a bit amateurish and with Canonical’s usual high standards, I was a bit surprised 😦