Extract common functions to common.js.
Check for <base href="[url]"> first when dealing with relative URLs in <link> tags, per http://www.rssboard.org/rss-autodiscovery.