<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tech[niques] &#187; bookmarklet</title>
	<atom:link href="http://tech.niques.info/tag/bookmarklet/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.niques.info</link>
	<description>Technology applied to modern life</description>
	<lastBuildDate>Mon, 14 Jun 2010 11:27:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple Method to Decode the Destination of Tracking URLs</title>
		<link>http://tech.niques.info/decode-uri-bookmarklet/</link>
		<comments>http://tech.niques.info/decode-uri-bookmarklet/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 11:00:51 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Tip]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://tech.niques.info/decode-uri-bookmarklet/</guid>
		<description><![CDATA[Tracking services are often used to ID the source of web traffic. The Decode URI bookmarklet helps you find their final destination if you prefer to avoid them.]]></description>
			<content:encoded><![CDATA[Copyright © 2010 <a href="http://tech.niques.info">Tech[niques]</a>. Visit the original article at <a href="http://tech.niques.info/decode-uri-bookmarklet/">http://tech.niques.info/decode-uri-bookmarklet/</a>.<br /><div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:bae2fb0f-14ec-4057-b101-e38aca8b25f6" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/bookmarklet" rel="tag">bookmarklet</a>,<a href="http://technorati.com/tags/utility" rel="tag">utility</a></div>
<p>This morning I clicked on a link in a newsletter from Sun and was presented with a &quot;server not found&quot; error.&#160; Odd, especially given I would expect a company of that size to have better QA than that.&#160; When I found the same issue with a Software AG newsletter later in the day it was time to investigate.</p>
<p>Turns out this wasn&#8217;t a coincidence.&#160; Both emails were using links passing through the same tracking server: promo-manager.server-secure.com.&#160; I suspected our Corporate firewall was blocking the tracking server, but the content itself would be OK.&#160; </p>
<p>Upon inspecting Firefox&#8217;s location bar it was obvious that the latter part was an encoded destination URL:</p>
<p><code>https://promo-manager.server-secure.com/pm/mail/link.php?id=98027102 &amp;link=http%3A%2F%2Fau.sun.com%2Fedge%2F2008%2F02 %2Fentry_level.jsp%3Fcid%3D921839</code></p>
<p>This is good practice by the web developer but I hate manually trying to decode those things.&#160; %3A is &quot;:&quot;, %2F is &quot;/&quot;, but anything beyond that is a struggle.&#160; There had to be an easier way.</p>
<p>I&#8217;ve been tinkering with some Javascript recently and it occurred to me a bookmarklet should easily be able to tackle this task.&#160; A quick rummage through a language reference and voila &#8211; the following bookmarklet was born.&#160; Install it by dragging the link onto your toolbar.&#160; Use it by opening the bookmarklet when on a page with an encoded URL.</p>
<p><a title="Decode URI Bookmarklet" href="javascript:location.href=decodeURIComponent(location.href);">Decode URI</a></p>
<p>The code isn&#8217;t rocket science.&#160; It does exactly what I needed.</p>
<p><code>javascript:location.href=decodeURIComponent(location.href);</code></p>
<p>After I ran the bookmarklet the location bar contained the following.&#160; All I had to do was discard everything prior to the &quot;link=&quot; entry and I was back in business! </p>
<p><code>https://promo-manager.server-secure.com/pm/mail/link.php?id=98027102 &amp;link=http://au.sun.com/edge/2008/02/entry_level.jsp?cid=921839</code></p>
<p><strong>Note</strong>: The initial URL above is currently working so it would seem our Corporate security guys are getting a little over zealous.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Ftech.niques.info%2Fdecode-uri-bookmarklet%2F';
  addthis_title  = 'Simple+Method+to+Decode+the+Destination+of+Tracking+URLs';
  addthis_pub    = 'DawMatt';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://tech.niques.info/decode-uri-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
