Series: Sex Wax The Web
Tips on wrenching performance from your Web browser
Article 1 of 2 in series
Like many of you, I spend a lot of time in my Web browser each day. In my case, I'm researching topics for TidBITS, following URLs sent to me in email, or perhaps working on a book projectShow full article
Like many of you, I spend a lot of time in my Web browser each day. In my case, I'm researching topics for TidBITS, following URLs sent to me in email, or perhaps working on a book project. I've been known to fill up Internet Explorer's 500-site default history file in a few days (it's now set to 2,000). In short, I stress Web browsers. I want them to be as fast and fluid as possible, within the constraints of my 56 Kbps dedicated Internet connection. Actually, I'd like them to read my mind, but that could get kind of creepy given the nature of the main Web browser companies. Over time, I've developed some ways of working that make using a Web browser easier and faster - perhaps some of them will be of use to you as well.
Shortcuts 'R' Us -- I'm on a mission to tell people about a neat little shortcut in the latest versions of both Netscape Navigator and Microsoft Internet Explorer. Most company Web sites have the domain name www.company.com, where "company" is the name of the company. In both of the main Web browsers, if you type just the name of the company in either the Address/Location field or the Open Location dialog box, the Web browser will guess at "www.company.com" for you. (And don't forget that you don't ever have to type in "http://" to go to a Web site.) Since I spend a lot of time hitting sites for companies like Apple, Microsoft, Netscape, Claris, Adobe, Symantec, and so on, I've found this to be a tremendous time-saver over trying to edit the existing URL showing in the Address/Location field or typing the full domain name. For some reason, it even feels faster to me than creating a bookmark. Netscape Navigator currently takes this feature one step further than Internet Explorer: using Navigator, you can use just a company name along with the remainder of a URL path, so just typing "tidbits/tb-issues" in Navigator's Location field is equivalent to:
He Who Dies with the Most Buttons Wins -- The left button on my venerable Kensington TurboMouse 4.0 stopped working recently, and I took the opportunity to buy a new TurboMouse 5.0, which has, count 'em, four buttons. With the associated MouseWorks software, you can define those buttons to do almost anything in any program. The programs I've concentrated on so far are my Web browsers, since I find that I tend to do the same things in almost all Web pages. I click the Back button a lot, and I scroll up and down in pages that don't fit on screen. So, I've defined the top two buttons to Scroll Previous and Scroll Next, and the lower-right button to Back (it actually types the Command-[ keystroke). I can't tell you how much smoother browsing the Web feels when you have single-button access to those functions. I've always liked Kensington's input devices - if you spend a lot of time in a Web browser, that may be enough of an excuse for you to think about getting a multiple button mouse or trackball.
ShrinkWrap the Web -- One technique I've started using recently to improve the speed of my Web browsers (this works for both Netscape Navigator and Microsoft Internet Explorer) relies on Aladdin's ShrinkWrap 2.1, written by Chad Magendanz (watch for version 3.0 soon, with some neat new features). Web browsers all use cache folders to store Web pages you've visited and display them again quickly if you revisit the site. Reading files from the hard disk, though faster than bringing them in over the Internet, isn't as fast as many of us would like. What if you could have the Web browser store the pages on a RAM disk instead? That would be significantly faster and would have the added advantage of keeping all those cache files off your hard disk, where they're just clutter. Even better, since off-loading the cache files to a RAM disk reduces the number of writes to your hard disk, disk corruption is less likely to occur if you crash while a cache file is being written, for instance.
I first tried using the RAM disk capabilities available from the Memory control panel, but the standard RAM disk didn't work well. It loses its contents if you shut down the Mac, and it can also forget its name, which screws everything up. So, and I don't know who first suggested trying this, I turned to ShrinkWrap, which can mount a disk image in RAM, essentially creating a persistent RAM disk.
Although not difficult, the process isn't inherently obvious. Launch ShrinkWrap and open the Preferences dialog. Make sure "Keep mounted images in RAM" and "Mount images unlocked by default" are checked, since you want to take advantage of the speed of RAM and the Web browser must be able to write to the image. Make sure that the "Save disk image files as" pop-up menus are set to "ShrinkWrap Image File" (or else ShrinkWrap won't mount them automatically). Then, from the Image menu, choose New Image, name the disk image, click the Other button, and enter the size you want.
If you've got enough RAM, I recommend about 5 MB. The Web browsers won't use all that space (since they know they shouldn't fill up the hard disk). There's not much advantage to using a larger cache folder setting unless you frequently visit Web sites that use Shockwave Director heavily. You want your Web browser to check pages once per session, because otherwise you'll miss changes, so it's unlikely that storing any more than a few megabytes of cache files will help performance.
When you click the OK button, ShrinkWrap creates an image file (on the desktop by default). If you double-click that image file, ShrinkWrap mounts it as a volume. Next, you must set your Web browser to use the ShrinkWrap volume for cache files.
In Microsoft Internet Explorer, open the Preferences dialog from the Edit menu, and click the Advanced tab. Make sure the Cache settings are set to a maximum of 5 MB, and click the Change button to locate your newly created ShrinkWrap volume. You may wish to click the Empty button to delete all the previously cached files before changing over to the ShrinkWrap volume, just to recover some space.
In Netscape Navigator, from the Options menu choose Network Preferences. Click the Cache tab, set the Cache Size to 5 MB or so, and click the Browse button to locate your new ShrinkWrap volume. Again, you may wish to click the Clear Disk Cache Now button before switching to recover the space that's being used.
Once you've got your Web browser set to use the ShrinkWrap volume, you need to make sure that it will be present whenever you launch your Web browser. Otherwise, the Web browser will reset itself to use some other folder. (Internet Explorer is a bit messy about this, placing the Explorer Cache folder in a variety of places. Netscape Navigator always seems to go back to the Cache folder in the boot volume's Netscape folder, located in the Preferences folder.) So, move the ShrinkWrap disk image file (not the mounted volume!) to your Startup Items folder so that ShrinkWrap mounts it on every restart.
One slight problem that I had is that you can't put an alias to a Web browser in your Startup Items folder because it will launch before ShrinkWrap has finished mounting the volume. You might be able to get around this with creative naming to force certain load orders, depending on your specific situation, but another solution could be to use Exta Software's $8 shareware Delayed Startup Items utility, which waits until your Mac is idle for a few moments and then launches items in a Delayed Startup Items folder.
If you ever launch your Web browser when the ShrinkWrap volume isn't mounted (say, if you boot without extensions and then drop an HTML file on your Web browser to view it), be aware that the Web browser may reset its cache folder to another volume. It's worth checking every now and then to make sure this hasn't happened accidentally.
Once you do this, you can enjoy the added speed of reading cached Web pages from a RAM disk and the peace of mind of knowing that you're keeping hundreds of unnecessary files off your hard disk.
Article 2 of 2 in series
by Geoff Duncan
Maybe it was the steamy title, but Adam's article "Sex Wax Your Browser" in TidBITS-377 (which contained a few tips for efficiently using Web browsers) generated a surprisingly large email response from TidBITS readersShow full article
Maybe it was the steamy title, but Adam's article "Sex Wax Your Browser" in TidBITS-377 (which contained a few tips for efficiently using Web browsers) generated a surprisingly large email response from TidBITS readers. Many people wrote in with additional thoughts or variations on Adam's suggestions - I thought I'd share a few of those and throw in some thoughts of my own.
Shortcuts, Intranets, & Open Transport -- In his article, Adam wrote that the latest versions of Netscape Navigator and Microsoft Internet Explorer both enable you to access a Web site with a domain name in the form of "www.company.com" by typing just the word "company" in the browser's Address or Location field. Thus, entering "tidbits" in the field would take you to:
Although what Adam describes is typical for many dial-up and dedicated Internet users, readers wrote in to note some variations. Typing "tidbits" in a browser's Address/Location field actually first tries to set up a connection with a machine called "tidbits" within your current domain (such as "tidbits.company.com"). If you're using a stand-alone Mac, this isn't a problem: the Web browser fails to find that machine, then tries "www.tidbits.com." However, if you're on a corporate or organizational intranet, you might see different behavior. For instance, if there really is a machine called "tidbits" within your intranet, your browser will connect to it rather than TidBITS' Web site. Also, if your intranet is large (or slow), merely searching the network for a local machine can take quite a bit of time. A few readers reported their browsers frequently time out before they're done looking for a machine on their corporate intranets, so they always use bookmarks (or type in longer forms of a site's domain name) to access external Internet sites.
If you're using Open Transport, you can change how Internet applications look for sites. At the lower right of the TCP/IP control panel, you'll see a field labeled Search domains (or Additional Search domains, if the control panel is in Advanced mode - you can select User Mode from the Edit menu to change modes). In this field, you can enter other Internet domains you'd like your Mac to treat as if they were on your local network.
For example, I access the Internet from the domain quibble.com. However, I've also entered tidbits.com as an additional search domain, so I don't have to type it out to access any of TidBITS Internet servers. I can access TidBITS' Web site by typing "king" in the Address/Location field, since the machine www.tidbits.com also goes by the name king.tidbits.com. This technique works so long as none of TidBITS' machines have the same names as machines within my quibble.com domain - if I type "www" my browser will preferentially connect to my (currently unexciting) Web server at www.quibble.com.
Open Transport's additional search domains can be confusing; for instance, Internet sites you access using these additional search domain appear as if they're on your local network, so the full URL in the example above appears as "http://king/", which isn't what you'd want to cut and paste into an email message to someone on a non-local network. Additional search domains can also be slow if you add large domains (like apple.com) or slow domains. However, once you get used to them, many people find additional domains helpful, and they work with any Internet application - including Anarchie, Fetch, and Cyberdog - not just the major Web browsers.
ramBunctious -- The bulk of Adam's article discussed how to set up a custom ShrinkWrap volume to hold your browsers' disk caches in RAM for better performance. Several TidBITS readers wrote in to recommend ramBunctious - a $12 shareware RAM disk program from Elden Wood and Bob Clark - for the same purpose. As an application, ramBunctious seems to do a decent job with pure RAM disks, offering write-throughs to your hard disk to preserve your data, and an optional folder for items that are opened whenever you mount a RAM disk on your desktop. Although I can't really recommend ramBunctious over the ever-versatile ShrinkWrap - RAM disks can only be used with the ramBunctious application running (which takes another 380K of RAM), it can't mount or manipulate standard disk image files, it isn't scriptable, it has a few quirks, and ShrinkWrap is still free for non-commercial use - ramBunctious was stable in my brief testing, and a few TidBITS readers preferred its interface to ShrinkWrap's somewhat over-burdened preferences dialog. If you frequently need RAM disks and never use disk image files, ramBunctious might be worth a look.
Cyberdog -- Adam's discussion of using ShrinkWrap for browser caching only applied to Microsoft Internet Explorer and Netscape Navigator. Greg Scarich <firstname.lastname@example.org> wrote in with a tip on how to use the same technique with Cyberdog:
Thanks for the detailed discussion of setting up the persistent ShrinkWrap RAM cache. I took it one step further and got it working for Cyberdog. Cyberdog doesn't let you select the location for its cache, so I followed your instructions, then manually created a folder named Cyberdog Cache on the ShrinkWrap disk, then put an alias of that folder in the Cyberdog Preferences folder [which is inside the System's Preferences folder -Geoff], replacing the default folder of the same name.
I found Greg's technique works fine with Cyberdog 2.0, although presumably it would work with earlier versions too.
ShrinkWrap & AppleScript -- Finally, many TidBITS readers wrote to say they're taking advantage of ShrinkWrap's scriptability and using a script to mount a ShrinkWrap image for disk cache and then launch their favorite Web browser once the disk is mounted. Suzanne Courteau <email@example.com> writes:
This has come up several times in Macworld and other publications. In April we ran a Quick Tip ("Efficient Browser Cache") that suggested writing an AppleScript program to mount your ShrinkWrap RAM disk not at startup but when you're ready to go online - though I suspect after reading TidBITS-377, for you that is right after startup!"
Suzanne's right: Adam, Tonya, and I have dedicated Internet connections so we tend to want our disk caches ready from the moment we start up. However, many users with dial-up access to the Internet may not want to constantly set aside a few megabytes of RAM as a browser cache. The AppleScript outlined in the Macworld tip shows how to mount your ShrinkWrap image in RAM and launch Netscape Navigator from a single, double-clickable icon in the Finder; the same principles can be applied to UserLand Frontier, OneClick, and other programs. I've also written a slightly more elaborate AppleScript that isn't hard-coded to a particular ShrinkWrap image file or Web browser; with a little ambition, it could be modified to work with ramBunctious RAM disks.
We hope you find these tips from other TidBITS readers useful - happy Web browsing!