ADC Home > Reference Library > Technical Q&As > Networking > Internet & Web >
|
Q: My code needs to launch the default Internet browser to open my ".html" help files. What is the best way to do this? A: Mac OS 8.5 introduced the Internet control panel which, among other things, can be used to select and configure the preferred web browser. This Internet control panel is based on the popular Internet Config API, which is used (and in the case of earlier Mac OS versions, sometimes installed) by many of the third-party applications such as Internet Explorer, Anarchie, and Eudora. Information about the Internet control panel can be found in the Mac OS 8.5 Technote. Documentation on Internet Config and methods to detect its presence can be found at the Internet Config web site. In addition to maintaining a database of user preferences, the Internet Config API also provide a way to programatically invoke the default browser and request that it opens a specified URL. This is illustrated in the following code snippet:
Example 1: Using Internet Config to Launch an URL There are a few things you should do if you wish to redirect the launch of HTML documents to the user's preferred web browser when they are double-clicked in the Finder.
In addition, you might also want to investigate the HTML-rendering services provided by the help system introduced in Mac OS 9. See Inside Macintosh: HTML Rendering Library Reference for more information. |
|