Mac OS X: Bookmark management and .webloc files

Posted by Pierre Igot in: Macintosh
May 5th, 2003 • 10:15 pm

After changing web browsers too many times over the past few years, and HAVING had to export/import bookmarks from one to the other, a few months ago I decided to transition to browser-independent bookmark management. It’s pretty straightforward: Whenever you want to bookmark a site, instead of using your browser’s built-in bookmarking functionality, you drag the web site’s address to the Finder, which creates a file for the URL. Then you move this file to your Bookmarks folder and store it in the appropriate subfolder in the Bookmarks folder’s hierarchy.

By putting this Bookmarks folder in Mac OS X’s Dock, you can effectively use it as a Bookmarks menu in lieu of the one provided by the browser. Selecting a bookmark file in this folder/menu will launch it with your browser of choice (i.e. the one selected as your default browser in the “Internet” pane in System Preferences).

There are a few problems with this approach. The first one is that, surprise, surprise, Microsoft Explorer doesn’t work in the same way as other browsers such as Camino or Safari. When you drag an address from Explorer’s address bar to the Finder, it creates a file with the “.url” suffix, whereas doing the same thing in Camino or Safari creates a file with the “.webloc” suffix.

It looks like “.webloc” is the standard file format for URLs in Mac OS X. Microsoft has, not surprisingly, chosen to use another file format, which will cause Mac OS X to launch the URL in Explorer, regardless of what your browser of choice is.

Fortunately, the problem can be solved by a fairly simple change: Create a “.url” file by dragging a URL from Explorer to the Finder. SELECT the resulting “.url” file. Ask the Finder to SHOW the file information. Go to the “Open with” section. Change the setting from Explorer to your browser of choice. Click on the “Change All” button.

From now on, all your URL files, even if they are created in Explorer, will open with your browser of choice. (You will have to change this again if you change your choice of browser, however.)

“.webloc” files themselves are strange beasts. If you SELECT a “.webloc” file in the Finder and ask it to SHOW the file information, here’s what you get in the “Open with” section:

A picture named Finder-WebLocInfo.gif

Such files will, by default, be opened with the Finder in Mac OS X. This explains why, if you use the approach to bookmarks management described above, when you choose a bookmark in your Bookmarks folder menu in the Dock, Mac OS X switches to the Finder first and then to your browser of choice.

This behaviour is probably what enables Mac OS X to control which browser is used when double-clicking on a “.webloc” file. After all, if the “Open with” setting for such files were a specific browser, changing the browser preference in the “Internet” pane in System Preferences would have no impact. The extra step through the Finder is the step where Mac OS X decides which browser to open the “.webloc” file with.

What I find somewhat stranger is that the only other options listed in the “Open with” menu for “.webloc” files in the SHOW Information window are Camino and something called “Systemicons.bundle”. Where is Safari? You cannot even SELECT “Safari” using the “Other…” menu command. Strange.

Comments are closed.

Leave a Reply

Comments are closed.