Christian Heilmann

Posts Tagged ‘links’

Removing UTM data from URLs automatically for cleaner bookmarks

Monday, August 9th, 2010

One of my real annoyances right now is that when you open a link from Google reader and some other systems you get the link followed by tracking data. Take for example the following tweet from Sam:

tweet

If you click the bit.ly link it expands to this abomination:

http://google-chrome-browser.com/test-your-browsers-html5-prowess-html5-test?
utm_source=feedburner&utm_medium=twitter
&utm_campaign=Feed%3A+Google-Chrome-Browser+%28Google+Chrome%29&utm_content=Twitter

I’ve come across lots of delicious bookmarks that still have all that campaign monitoring stuff in them, which is annoying. To work around that I’ve just written myself a tiny GreaseMonkey script:

Install un-UTM for GreaseMonkey

If the browser now opens a link that has UTM data in it, it removes the information and reloads the page without it to make for a cleaner URL.

Here’s the source of the script for the paranoid:

var loc = window.location.toString();
if(loc.indexOf('utm_source')!==-1){
  window.location = loc.replace(/\?utm_source.*/,'');
}

What does adding empty links to a document do in terms of accessiblity?

Thursday, January 24th, 2008

Over at the YUI blog, I managed to convince accessibility researcher and all-out good colleague Mike Davies to publish a research on how empty links in the document affect accessibility.

Why would you ever add empty links to a document? Well, it is part of a Microformat, in this case the include pattern. Over to Mike:

The Microformats group have created an include pattern which is a mechanism for including a portion of data from one area of a page into another area on the same page. Essentially, it’s a means of preventing the duplication of data.
A good example of this is a page that lists all the reviews done by one person. Instead of every review having to duplicate the reviewer details, we can use the include pattern to define the reviewer once, and include it into each review. No needless duplication.
The main technique being advocated as an include is the humble link, but in an effort to minimise duplication of content, the example is an empty link; a link with no link text:

So if you wondered about this microformat and accessibilty, go on over to the yuiblog and have a read.