HTML Link Absolutifier

The following is valid for Firefox.

Relative links present a problem when one is attempting to rehost web content. In order to be valid on the new host, relative links must be made absolute, a tedious task to do by hand.

The link below is a bookmarklet that rifles through the hyperlinks and image references on the current page and makes each absolute, as represented in the Document Object Model (DOM).


Installing the Absolutifier

To install the absolutifier in your browser, bookmark it or drag it to your bookmarks toolbar. Here is an icon you can use to represent the link in your toolbar:

Save the image to a folder on your hard drive. Use the Favicon Picker to associate the image with the bookmark. Then you can get rid of the bookmark text, saving space in your toolbar.

Using the Absolutifier

While viewing a page that you want to rehost, click the bookmarklet. The Javascript code in the bookmarklet will run on the current page and change its relative links and image addresses to absolute, as represented in the browser's DOM. Then use the View Source Chart extension to view the resulting source code. The relative links and image addresses should have been replaced with absolute ones. Select the parts you want to rehost and transfer them to their new home.

Another way to access the modified page source is to Select All and use the View Selection Source context menu option.

Note that the normal source code viewing function (Ctrl-U) will not work. It will show the original, unmodified source with the relative links unmodified, even after the bookmarklet has run. The same applies to the Save as HTML option. The Save as Web Page Complete option will fix the relative links but copy the images to a local folder and rewrite their addresses to point into it. Not what you want.