November 16th, 2003 • 1:38 am
I’ve already written before about the weird way in which files with the “.webloc” extension are handled in Mac OS X. I am afraid things haven’t changed much in Panther.
A “.webloc” file is typically created when you click on the proxy icon next to the URL of a web page in the Address Bar in Safari and drag that icon to the Finder. The “.webloc” file thus created is a file containing the URL of the page. You can double-click on the file to open the corresponding web page in Safari.
Yet if you look at the information of a “.webloc” file in the Finder, you’ll see that, under “Open with:”, it says “Finder” and not “Safari”. In other words, the default application for opening “.webloc” files is the Finder.
How come double-clicking on such a file opens the web page in Safari then? Because (presumably) what Mac OS X does when you open a “.webloc” file is that it looks up in its settings what your application of choice is for viewing web pages (i.e. your default browser). If it’s Safari, then the “.webloc” file will open the web page in Safari. If it’s another browser, that other browser will be used when you double-click on a “.webloc” file in the Finder.
In other words, “.webloc” files don’t work like other files in the Finder. For other files, the application that they will be opened with when you double-click on them is indicated in the Information window under “Open with:”. For “.webloc” files, the application used to open them is determined through a separate mechanism that looks up your default browser setting.
This problem is further complicated by the fact that, in their infinite wisdom, in Panther Apple have decided to remove the “Internet” preference pane from System Preferences and integrate its content into the Mail and Safari preferences dialogs. In other words, if you want to change your default web browser from Safari to Camino, you need to… launch Safari and go to its “Preferences” dialog and change the setting under “General”. As Jeff Carlson recently wrote in TidBITS, this is totally non-intuitive and a lame attempt to enforce usage of Apple’s own Safari and Mail applications.
(I highly recommend using Monkey Food Software’s More Internet freeware preference pane to put these Internet settings back where they belong, i.e. in the System Preferences application.)
Getting back to today’s topic… If you go to Safari’s “Preferences” dialog and change the default browser to Camino, and then if you go to the Finder and double-click on a “.webloc” file, the corresponding web page will now be loaded in Camino rather than Safari. Yet the “Open with:” setting for “.webloc” files still says “Finder”.
The reason I am writing about this today is not because of this particular approach, which has its own justifications, even though its inconsistent with the rest of the Mac OS X interface regarding the way the process of opening files is handled.
No. The problem today is that this “alternative” approach used for opening “.webloc” files has unfortunate consequences in terms of usability.
For one, if you take a “.webloc” file in the Finder and drag it onto the “Safari” icon in the Dock, nothing will happen. Even though Safari is indeed the application used for opening “.webloc” files (from the user’s point of view), you cannot drag and drop a “.webloc” file onto the application’s icon.
What you can do, however, is open a blank window in Safari, and then go to the Finder and drag the “.webloc” file onto that blank Safari window in the background. This will cause Safari to load the corresponding web page.
But even then, things don’t work as expected. If you select more than one “.webloc” file in the Finder and drag your selection of files onto the blank Safari window in the background, Safari only opens the first “.webloc” file in your selection. All other “.webloc” files in your selection are ignored.
The only way to select more than one “.webloc” file in the Finder and get Safari to open all these files is to double-click on your selection in the Finder. Depending on what your preferences are in Safari, this will open each “.webloc” in a separate Safari window or in a separate tab in the same Safari window.
In a nutshell, the problem here is not that things don’t work, it is that they don’t work as can be reasonably expected by the end user, who couldn’t care less about what underlying mechanism is used by Mac OS X to open “.webloc” files. The bottom-line is that the process of opening such files should be identical to the process of opening other files — and it is not.
(Also, please refer to this item for more on the mess that Mac OS X’s handling of file extensions can create.)