Chapter 4. The Web
Hacks 32-48
All of us live on the Web these days, and the demarcation between the operating system and the Web has gotten fuzzier with each iteration of Windows. XP has even more web-based tools built into it than its predecessors.
In this chapter, you’ll find hacks that make using the Web even better. You’ll find hacks for protecting your privacy when you surf, killing pop-up ads and spyware, giving Internet Explorer a face-lift, hacking the great new free Firefox browser, searching the Internet, using the new Google Desktop and MSN Desktop Search, speeding up file downloads, and more.
Give Internet Explorer a Face-Lift
Don’t like the way Internet Explorer looks? A better-looking browser is just a Registry edit away.
Everything about Internet Explorer screams, “Dull, dull, dull!” From its generic-looking logo to the plain background for its toolbars, you just better hope the content you’re visiting is enough to keep you awake. But you don’t need to be stuck with its plain-Jane looks; these Registry hacks will let you change it however you’d like.
Change the Internet Explorer Logo
Internet Explorer has both a static and an animated logo. The static logo displays when the browser is inactive, and the animated logo displays when the browser is locating a site, connecting, and actively downloading pages or images from the Web. Because you have the choice of displaying large or small icons on the Internet Explorer toolbar (to switch back and forth between the two, choose View → Toolbars → Customize → Icon Options → Large/Small icons), there are two sizes of both the static and animated logos.
Before you begin, you’ll need to create new logos to replace the existing ones. You’ll have to create two sets of icons in .bmp format: one set for the smaller logo and another set for the larger logo. Each set will have a static logo and an animated logo. The static logos should be 22 22 pixels for the smaller size and 38 38 pixels for the larger size. The animated logos have to be animated bitmaps, each of which should have a total of 10 frames. So, the smaller animated bitmap should be 22 pixels wide by 220 pixels high, and the larger animated bitmap should be 38 pixels wide by 380 pixels high.
Create the static bitmaps with any graphics program, including the version of Paint that comes with XP. You can also use special icon-creation programs to create your icons, such as Microangelo (http://www.microangelo.us/). See [Hack #19] for more details. (Make sure when using Microangelo to choose Tools → New Image format, which will let you create the icons with the proper pixel dimensions, as explained in the previous paragraph.)
To create the animated bitmaps, you’ll need special tools. Microangelo does a great job of creating them, and that’s your best bet. If you prefer, though, you can create the 10 separate frames for the animated bitmaps in a graphics program such as Paint and then stitch the 10 separate frames together using the Animated Bitmap Creator (http://jsanjuan.tripod.com/download.html), a free command-line program.
To change Internet Explorer’s static logos to your new ones, run the Registry Editor [Hack #83] and go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main
Create two string values named SmallBitmap
and
BigBitmap
and give them each the value of their
filename and location, including the full path—for example,
C:\Windows\IEbiglogo.bmp and
C:\Windows\IEsmalllogo.bmp. As you might guess,
the SmallBitmap
value points to the smaller logo,
and the BigBitmap
value points to the larger logo.
To use your new animated logos, go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Toolbar
Create two string values named SmBrandBitmap
and
BrandBitmap
and give them each the value of their
filename and location—for example,
C:\Windows\IEbiganimatelogo.bmp and
C:\Windows\IEsmallanimatelogo.bmp. Once again,
as you might guess, SmBrandBitmap
is for the
smaller animated logo and BrandBitmap
is for the
larger logo.
Exit the Registry and close Internet Explorer. When you next start up Internet Explorer, it should display your new logos. To revert to the default logos, simply delete the values you’ve created.
Add a Background to the Internet Explorer Toolbar
The Internet Explorer toolbar that sits at the top of Internet Explorer is about as dull as it gets—a plain, solid background, like the rest of Internet Explorer. But it doesn’t have to be that way. You can add any background you want.
First, create the background or use an existing one. The background should be in .bmp format. Create it using a graphics program such as Paint Shop Pro (available from http://www.jasc.com) or Microangelo. See [Hack #19] for more details.
You’ll also find a variety of .bmp files in the C:\Windows folder, so check them out to see if you like any. You might try FeatherTexture.bmp, which you can see in use as an Internet Explorer toolbar background in Figure 4-1. Whatever you choose, though, make sure it’s light enough to show black text and it’s not so busy that you can’t read the menu text that will be on top of it. If you create or use a file that’s too small, Internet Explorer will tile it for you. However, don’t use a bitmap smaller than 10 10 pixels, because all the work Internet Explorer has to do to tile images that small will slow down your web browsing.
Once you have a bitmap, run the Registry Editor and go to:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar
Create a new string value named BackBitmapIE5
and
give it the value of the filename and location of the background
you’re going to use, such as
C:\Windows\FeatherTexture.bmp. Exit the Registry
and close Internet Explorer. When you next start up Internet
Explorer, it will display the background on the toolbar. To take away
the background, simply delete the BackBitmapIE5
key.
Tip
You can change the background of the Internet Explorer toolbar without having to edit the Registry; you can use Tweak UI [Hack #8] . Run Tweak UI, click Internet Explorer, and click the box next to “Use custom background for Internet Explorer toolbar.” Then, click the Change button and choose the file you want to use as the background. You’ll see a sample of how the toolbar will look, so change the file until you find one you want to use. When you find it, click OK, close Internet Explorer, and restart it. The new toolbar will be there.
Change the Text of Internet Explorer’s Titlebar
Internet Explorer’s titlebar displays the text “Microsoft Internet Explorer,” along with the title of the page you’re currently visiting. However, you can change the “Microsoft Internet Explorer” text to any text you want. Run the Registry Editor and go to:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
Add a new string value named Window Title
and give
it a value of whatever text you want displayed in the titlebar. Exit
the Registry and close Internet Explorer if it’s
open. The next time you open Internet Explorer, the titlebar will
have your new text.
If you want your titlebar to have no text in it, aside from the title
of the page you’re currently visiting, create the
Window Title
string value but leave the
Value
field empty.
Stop Pop Ups with SP2—and Without It
You don’t have to be victimized by obnoxious pop-up ads and web sites on the Internet. Fight back with these tips and tools.
Surfing the Web used to be such a simple, enjoyable experience. Go to the web site of your choice, enjoy the page, and head somewhere else.
No longer. At times, it now seems like a sleazy carnival midway, complete with flashing lights and loud music, barkers pleading at you to venture into the sideshows, scamsters promising you big payoffs if you try three-card Monte, and no-goodniks lurking in the shadows.
For that, we have pop ups to thank. Pop ups are ads that, as the name implies, pop up over your browser, usually in a smaller window, and frequently contain flashing messages and other kinds of obnoxious come-ons. The infamous X10 surveillance camera pioneered this insufferable form of advertising, and now it’s everywhere.
Pop ups are more than just insufferable annoyances, however. They can be dangerous as well. Click one of their come-ons, and you might unwittingly download spyware or a Trojan horse onto your PC.
Tip
For more details about combating spyware, see [Hack #34] .
You don’t have to be victimized by them, though. As you’ll see in the rest of this hack, there are things you can do to keep your PC from resembling a virtual midway.
Use SP2’s Built-In Pop-Up Blocker
If you haven’t upgraded to Windows XP Service Pack 2 (SP2), there’s at least one good reason why you should: Internet Explorer’s built-in pop-up blocker. It does an exceptional job of blocking pop ups, and it lets you allow pop ups from some sites while banning them from all others.
Tip
If the pop-up blocker isn’t turned on, choose Tools → Pop-up Blocker → Pop-up Blocker Settings, check the box next to “Show Information Bar when a pop-up is blocked,” and click Close.
By default, the pop-up blocker is turned on. Visit a site with a pop up, and you’ll see a screen like the one shown in Figure 4-2.
There are two things of note here. First, at the top of the screen, you’ll see what’s called the Information Bar, which tells you a pop up was blocked. Then, right in the middle of the screen, you’ll see a screen telling you to look at the Information Bar. Clearly, that notification is unnecessary, so select “Do not show this message again” and click OK.
Normally, you don’t want to see a pop up, so you wouldn’t need to do anything else at this point, beyond breathing a sigh of relief that a pop up was blocked. But in some instances, you want to let a pop up through. On occasion, a site will use pop ups for some good purpose—for example, to deliver more information in a small window.
If you want to allow pop ups through from the site, click the Information Bar, and you’ll see the screen shown in Figure 4-3. Choose Temporarily Allow Pop-ups to allow pop ups from the site on just this visit, and choose Always Allow Pop-ups from This Site if you want to always let pop ups from the site through. Whichever you choose, the pop up will be let through immediately.
If you want to turn off the pop-up blocker altogether, choose Settings → Turn Off Pop-up Blocker. And if you’d like to turn off the Information Bar so that it doesn’t appear when a pop up is blocked, choose Settings and select Show Information Bar for Pop-ups to remove the check next to it.
But what happens if you’ve chosen to permanently allow pop ups from a site and later decide you no longer want to let them through? It’s easy to tell the pop-up blocker to no longer let those pop ups through.
Warning
Installing SP2 has been known to cause problems on some XP systems and, in some cases, has stopped people from getting operating system updates via the Windows Updates site. For help in fixing the problems see [Hack #114] .
Choose Tools → Pop-up Blocker → Pop-up Blocker Settings. The Pop-up Blocker Settings dialog appears, as shown in Figure 4-4.
All the sites you’ve decided to allow pop ups from are in the “Allowed sites” box. To no longer allow pop ups from any of those sites, highlight the sites and click Remove. If you want to allow more sites than those shown here, type each site into the “Address of Web site to allow” box and click Add.
You can also tell Internet Explorer how aggressively to block pop ups, by choosing a different filter level from the Filter Level drop-down box. There are three levels you can choose:
- Low
Allows pop ups from secure sites—that is, sites that use SSL encryption, such as banking sites. You’ll know you’re at a secure site if its URL begins with https://.
- Medium
The default level, which blocks most pop ups. It will allow a few pop ups, through—notably, if it detects the pop up is one you might want to be allowed. What kind of pop up might that be? In some cases, a site might include a link that, when clicked, initiates a pop up—for example, launching a small map in a pop-up window. At the medium level, that pop up will get through.
- High
Blocks all pop ups of any type, even if you’ve clicked a link to initiate them.
Finally, the screen lets you choose to play a sound when a pop up is blocked. It also gives you the option of having the Information Bar be displayed when a pop up is blocked.
Download Software to Stop Pop Ups in IE
If you don’t have SP2, you’ll still want to block pop ups, of course. There are many for-pay pop-up killers, but if you don’t want to spend the cash, you can get an excellent one for free: EMS Free Surfer mk II, shown in Figure 4-5. It lets you set several levels of pop-up protection—you can block all pop ups or only those that appear to be unwanted—and you can turn it on and off with a click.
It has other helpful tools as well, such as letting you shut every open instance of Internet Explorer with a single click, and it includes an add-in that will clean out your system cache and list of recently visited sites. Get it at http://www.kolumbus.fi/eero.muhonen/FS/fs.htm. (Don’t confuse it with a related product, EMS Free Surfer Companion, which offers more features than the free version and costs $20.) Another good pop-up blocker is Pop-Up No-No!, available from http://www.popupnono.com. It blocks Flash animation ads, as well as pop ups. (For more details, see [Hack #42] .)
Ditch IE: Use a Different Browser to Stop Pop Ups
Here’s one way to get rid of pop-up annoyances: skip Internet Explorer altogether! Opera, Mozilla, and Firefox all include built-in pop-up killers as a menu option.
Opera
Download Opera from http://www.opera.com. To enable its pop-up killer, choose File → Preferences → “Refuse pop-up windows.” You can also have the program open pop-up windows in the background instead of on top of your browser.
Mozilla
Download Mozilla from http://www.mozilla.org. To enable its pop-up killer, choose Edit → Preferences → Privacy & Security → Pop-ups → and check “Reject pop-up windows.”
Firefox
Download Firefox from http://www.mozilla.org/products/firefox. To enable its pop-up killer, choose Tools → Options and check the box next to Block Popup Windows.
Stop Messenger Service Pop Ups
A year or more ago, the most obnoxious pop ups of all started to appear on computer users’ screens: pop ups that aren’t connected to a browser, that appear even when you’re not surfing the Web, and that show up in a text-message window for no apparent reason. You’ve taken no conceivable action that could have caused them to appear, such as visiting a web site. And yet there they are.
These text pop ups use XP’s Messenger service, which was designed for sending notifications over internal local area networks—for example, when a network administrator wants to notify network users that a server is about to go down, or when you’re notified that a printer has completed a job of yours.
Tip
The Messenger service is not related to Windows Messenger, Microsoft’s instant-messaging program.
But spammers took hold of the technology and now blast out text pop ups to IP addresses across the Internet. How ubiquitous are these pop ups becoming? When I bought a new laptop, within 10 minutes of turning it on for the first time I had received my first Messenger service pop up.
To kill these pop ups, disable the Messenger service. Run the
Services Microsoft Management Console by typing
services.msc
at a command prompt or the Run box
and pressing Enter. Double-click the entry for Messenger, choose
Disabled as the Startup type from the screen that appears, and click
OK. Pop ups will no longer get through. Unfortunately, neither will
any network messages from administrators if you’re
on a LAN.
If you’re running a router at home that allows you
to block ports, you can kill these messages by disabling port 135.
How you do this varies according to your router. To do it on some
models of Linksys routers, go to the router administrator screen and
choose Advanced → Filters. In Filtered Private Port Range,
choose Both, and for the range, type 135
twice.
Click Apply. The pop ups should now be disabled.
By the way, another good reason to download and install SP2 is that it automatically turns off Messenger Service pop ups.
See Also
Kill Spyware and Web Bugs
You don’t have to be victimized by obnoxious applications that spy on you, hijack your browser, or worse. Fight back with these tips and tools.
For most people, spyware has replaced viruses or worms as the most-feared and obnoxious danger on the Internet. A relatively few number of people become infected by viruses or worms, but it seems as if almost everyone you know has been hit by some kind of spyware.
Spyware is a catch-all phrase that encompasses many different types of obnoxious programs. The least intrusive of the bunch report on your surfing activity to a web site, which tracks what you do and then delivers ads to your PC based on your interests. But increasingly, they are becoming more intrusive. Some of them spawn pop-up swarms of ads that appear so quickly they overwhelm your PC, slowing it down and making it unusable. Others hijack your browser home page so that no matter what you do, you’re sent to a home page of the hijacker’s choosing, which might be a pornographic site, or perhaps a web site that spawns even more pop ups. And some kinds of spyware, called keyloggers, literally spy on you by watching every keystroke you make, and then send that information to someone on the Internet.
Web bugs are invisible bits of data, frequently a single pixel in size (sometimes called clear GIFs ), that can track all your activities on a web site and report them back to a server.
You don’t have to be victimized, though. As you’ll see in the rest of this hack, there are things you can do to keep spyware and web bugs at bay.
Watch Out for Web Bugs
Web bugs are one of the more pernicious ways your online activities can be tracked, no matter which browser you’re using. Sometimes, the web site the bugs send information to isn’t the one that contains the web bug; for example, a web bug might send information back to an online advertising network.
Web bugs are surprisingly common. The Cyveillance technology and analysis company found that their use grew nearly 500% between 1998 and 2001. Web bugs can send the following information back to a server:
The IP address of your computer
The URL of the page on which the web bug is located, so they know you visited the page
The time the web bug was viewed, so they know exactly when you visited the page
The URL of the web bug image
The type of browser you have
Your cookie values
A free piece of software called Bugnosis (http://www.bugnosis.org) will alert you whenever it comes across web bugs on pages you visit. It reports on the URL the bug reports to, and, for some bugs, it will let you click a link it creates so that you can send an email of complaint to the web site that runs the bug. It runs inside Internet Explorer as a toolbar, and doesn’t work with any other browsers.
The software can’t actually protect you against web bugs, but it can alert you when you visit pages that use them, so you’ll know if you want to stay away from them in the future. When you visit a site, the Bugnosis toolbar reports on the number of suspicious items that might be web bugs. To see detailed information about each suspicious item and web bug, click the down arrow next to the Bugnosis logo and choose Bugs Found in This Session. You’ll see a list of every suspicious web bug, as you can see in Figure 4-6. Click the item, and you’ll see a more detailed description, and an analysis on whether the item is truly a web bug, or only suspicious.
Bugnosis can’t actually block web bugs; it can only alert you to their presence. If you want your privacy protected when you surf the Web, your best bet is to surf anonymously [Hack #36] .
Protect Yourself Against Spyware
Spyware is becoming ubiquitous and nastier as well. But you don’t have to be a victim; there’s a good deal you can do to protect yourself:
One of the best and most popular free ones is Ad-Aware, available from http://www.lavasoft.de. It checks your system for spyware, finding not only program files, but also Registry entries and cookies, as shown in Figure 4-7. After it does a check, you can choose which spyware problems you want the program to fix, and it’ll go about its work, deleting files, folders, and cookies, and fixing Registry entries. Because no one spyware-killer is perfect, I suggest getting another free one, Spybot Search & Destroy, from http://www.safer-networking.org/en/index.html. Use both of them regularly to keep your system clean.
Warning
Keep in mind that when you delete spyware, you can disable software as well, so it’s a good idea to always create a restore point before deleting spyware. Choose Control Panel → Performance and Maintenance → System Restore and follow the instructions. For example, if you remove the Cydoor spyware program, the Kazaa file-sharing program will no longer work. Alternatives to Kazaa include Shareaza (http://www.shareaza.com), a frontend to the popular Gnutella file-sharing network that also can hook into other file-sharing networks, such as the one Kazaa uses.
Get a for-pay spyware-killer
Ad-Aware and Spybot Search & Destroy do good jobs of finding and killing spyware after it’s already infected your system. But better still is to get software that will stop the infection altogether. An excellent one is Webroot Spy Sweeper, available from Webroot Software at http://www.webroot.com. You can download it and try it for free; if you continue to use it, you have to pay $19.95 per year. It does an excellent job of warning you when spyware tries to infect your system, and then stops it. It will also warn you when any program tries to start up automatically when XP starts, and when any program tries to change your home page. And like Ad-Aware and Spybot Search & Destroy, it will scan your system for spyware and then eradicate it as well. Figure 4-8 shows the program’s configuration screen.
Tip
Microsoft also has an excellent spyware killer, Microsoft Windows AntiSpyware, that stops spyware from infecting your system and also scans it for threats. Get it at http://microsoft.com/spyware.
Be vigilant about what you download
Ad-supported programs can include spyware, though not all do. Check out the Index of Known Spyware page run by Gibson Research at http://grc.com/oo/spyware.htm for a list of spyware programs.
Use a personal firewall such as ZoneAlarm [Hack #78]
A personal firewall will let you block any program on your system from contacting the Internet without your approval, so you can use it to block spyware. XP’s Windows Firewall doesn’t have this capability, so you can’t use it to block spyware.
Kill pop ups
Pop-up ads are a common way of delivering spyware. Click a pop up, and you might get infected with spyware. So, kill pop ups. For details, see [Hack #33] .
A web site might attempt to download software to your PC without your knowledge, and it might carry a spyware payload. Install SP2; it includes a download blocker. Additionally, the Firefox browser [Hack #43] includes a download blocker as well.
Keep your antivirus software up-to-date
Antivirus software protects you against some spyware, so make sure you run antivirus software and keep it updated.
See Also
Take a Bite Out of Cookies
Protect your privacy and keep your surfing habits to yourself with proper cookie-handling.
Cookies are small text files that web sites put on your hard disk to personalize the site for you or to track and then record your activities on the site. Cookies have gotten a lot of press—most of it bad—but the truth is, not all cookie use is bad. As a means of site customization, they’re a great way of helping you get the most out of the Web. They can also carry information about log-in names and passwords, which is a timesaver, since you won’t have to log into each site every time you visit. If you delete all your cookies, you won’t automatically get your Amazon wish list the next time you visit that site.
Warning
Cookies are big timesavers when it comes to logging you into web sites automatically, but they can also be security holes as well. If you use them to log you in automatically, anyone who uses your computer will be able to log in to those sites with your username and password.
But cookies can also be used to track your online activities and identify you. Information about you, based on what cookies gather, can be put in a database, and profiles of you and your surfing habits can be created.
Because cookies can be privacy-invaders, XP gives you a number of ways to restrict how web sites place and use cookies on your PC. To understand how to restrict the ways cookies are used on your PC, first you need to understand three cookie-related terms:
- First-party cookie
A cookie created by the site you’re currently visiting. These cookies are often used by sites to let you log on automatically—without having to type in your username and password—and customize how you use the site. Typically, these kinds of cookies are not invasive.
- Third-party cookie
A cookie created by a site other than the one you’re currently visiting. Frequently, third-party cookies are used by advertisers or advertising networks. Some people (including me) consider these kinds of cookies invasive.
- Compact privacy statement
A publicly posted policy that describes the details of how cookies are used on a site—for example, detailing the purpose of cookies, how they’re used, their source, and how long they will stay on your PC. (Some cookies are automatically deleted when you leave a web site, while others stay valid until a specified date.)
To protect your privacy, you also need to know the difference between implicit consent and explicit consent. Explicit consent means you have specifically told a site it can use personally identifiable information about you. It’s the same as opting in. Implicit consent means you haven’t specifically told a site not to use personally identifiable information. It’s the same as not having opted out, or specifically requesting to be taken off a list.
Internet Explorer lets you customize how it handles cookies. You can choose from six levels of privacy settings, from Accept All Cookies to Block All Cookies. When choosing, keep in mind that some sites won’t function well or at all at the higher privacy settings, particularly if you choose to reject all cookies. I generally find that Medium High is a good compromise between protecting privacy and still being able to personalize web sites.
To customize your cookie settings in Internet Explorer, choose Tools → Internet Options → Privacy. Move the slider (shown in Figure 4-9) to your desired level.
Table 4-1 shows how each setting affects Internet Explorer’s cookie-handling.
Setting |
How the setting affects your privacy |
Block All Cookies |
Blocks all cookies, without exception. Does not allow web sites to read existing cookies. |
High |
Blocks cookies from all web sites that don’t have a compact privacy policy. Blocks all cookies that use personally identifiable information without your explicit consent. |
Medium High |
Blocks third-party cookies from sites that don’t have a compact privacy policy. Blocks third-party cookies that use personally identifiable information without your explicit consent. Blocks first-party cookies that use personally identifiable information without your implicit consent. |
Medium (Default) |
Blocks third-party cookies from sites that don’t have a compact privacy policy. Blocks third-party cookies that use personally identifiable information without your implicit consent. Accepts first-party cookies that use personally identifiable information without your implicit consent, but deletes them when you close Internet Explorer. |
Low |
Blocks third-party cookies from sites that don’t have a compact privacy policy. Accepts third-party cookies that use personally identifiable information without your implicit consent, but deletes them when you close Internet Explorer. |
Accept All Cookies |
Accepts all cookies, without exception. Allows web sites to read existing cookies. |
Tip
In Firefox, pretty good cookie management is built in. Access settings via Tools → Options → Privacy. You can block cookies, allow cookies on a site-by-site basis, set expiration times for cookies, and more.
Customizing IE Cookie-Handling
You’re not locked into IE’s preset levels of cookie-handling. If you like, you can customize how it handles cookies so that you can, for example, accept or reject cookies from individual sites, or accept or reject all first-party and third-party cookies.
To accept or reject all cookies from a specific site, choose Tools → Internet Options → Privacy → Sites. You’ll see the Per Site Privacy Actions dialog box, as shown in Figure 4-10. Type in the name of the site you want to accept or block cookies from, and click either Block or Allow.
To customize how you handle first-party and third-party cookies, choose Tools → Internet Options → Privacy → Advanced. Check the “Override automatic cookie handling” box, as shown in Figure 4-11. You can accept or reject all first-party or third-party cookies, or be prompted whether to accept them. You can also decide to always allow session cookies , cookies that last only as long as you’re on a specific web site and are deleted once you leave the site.
Export, Import, or Back Up Your Cookies
Although some cookies can be intrusive, some can be helpful. They can log you into web sites automatically and customize the way you use and view the site. So, when you buy a new PC, you might want to export cookies from an older computer to it. If you have more than one PC, you might want all of them to have the same cookies. And you might want to back up your cookies for safe-keeping in case you accidentally delete the wrong ones.
To export or back up cookies from IE, choose File → Import and Export. The Import/Export Wizard will launch. Choose Export Cookies and follow the directions. A single text file containing all your cookies will be created in My Documents, though you can choose a different location for them. To import cookies, launch the Import/Export Wizard, choose Import Cookies, and browse to the location where the cookie file has been stored.
Examine and Delete Cookies Manually
You can’t examine and delete your cookies from within Internet Explorer. However, because XP stores each IE cookie as an individual text file, you can read them and delete them just as you would any other text file. Go to C:\Documents and Settings\<Your Name>\Cookies in Windows Explorer, and you’ll see a list of individual cookies in a format like this:
your name
@abcnews.com[1].txt
As a general rule, the name of the web site or ad network will be
after the @
, but not always—sometimes it
will merely be a number. Open the file as you would any other text
file (in Notepad, WordPad, or another text editor). Usually, there
will be a list of numbers and letters inside, though you might find
other useful information in there—for example, your username
and password for the web site. If you don’t want the
cookie on your hard disk, simply delete it as you would any other
text file.
Netscape Navigator and Mozilla handle cookies differently than Internet Explorer. They store all cookies in a single file, cookies.txt, typically found in C:\Documents and Settings\<Your Name>\Application Data\Mozilla\Profiles\default\********.slt, where ******** is a random collection of numbers and letters. So, the directory might be C:\Documents and Settings\Name\Mozilla\Profiles\default\46yhu2ir.slt. If you’ve set up different Netscape/Mozilla profiles (Tools → Switch Profile → Manage Profiles → Create Profile), cookies.txt won’t be in the default subfolder, but under each profile’s name. You can open the file and see each individual cookie. You can’t however, delete individual entries from the file by editing this file. Instead, use Netscape’s built-in Cookie Manager (at Tools → Cookie Manager → Manage Stored Cookies) to read and delete cookies.
In Firefox, you’ll find the cookies.txt file in C:\Documents and Settings\<Your Name>\Application Data\Mozilla\Firefox\Profiles\default.xxx, where xxx is a random collection of three letters. Use Firefox’s built-in Cookie Manager (Tools → Options → Privacy) to read and delete cookies.
Get a Third-Party Cookie Manager
The tools built into XP for managing cookies are reasonable, but for the most flexibility in handling cookies you should get a third-party cookie manager. My favorite (and my editor’s favorite) is Cookie Pal, available at http://www.kburra.com. It lets you easily customize which sites you’ll allow to put cookies on your PC, and it includes a cookie manager that lets you read and delete cookies. It also lets you accept or reject cookies on a case-by-case basis as you browse the Web. If you use browsers other than IE, you might be out of luck, though. As of this writing, Cookie Pal works only with Versions 3 and 4 of Netscape Navigator and Versions 4, 5, and 6 of Opera. (Mozilla and later Netscape versions have similarly good managers built in, as mentioned earlier.)
Opt Out of Cookie-Based Ad Networks
Online ad networks have the potential to create in-depth, privacy-invading profiles of your web travels and personal interests because they can place a single cookie on your hard disk that will track you across multiple sites. Normally, sites can’t share cookie information with each other, but ad networks have found a way around this, so they can aggregate your behavior from many web sites.
You can fight back by opting out of some of the biggest online ad networks. You’ll have them place an opt-out cookie on your hard disk that will tell the various sites not to track what you’re doing; this will go a long way toward protecting your privacy.
To opt out of the DoubleClick online advertising network, go to http://www.doubleclick.com/us/corporate/privacy/privacy/ad-cookie/ and click the Ad Cookie Opt-Out button at the bottom of the page.
To see whether the opt-out worked, if you’re an Internet Explorer user, go to your cookies folder, which is typically C:\Documents and Settings\<Your Name>\Cookies. Look for a cookie named your name@doubleclick[1].txt—for example, preston gralla@doubleclick[1].txt. The contents of the cookie should look something like this:
id OPT_OUT doubleclick.net/ 1024 468938752 31583413 3447013104 29418226 *
In Netscape Navigator, your cookies.txt file is typically found in C:\Documents and Settings\<Your Name>\Application Data\Mozilla\Profiles\default\********.slt, where ******** is a random collection of numbers and letters. So, the directory might be C:\Documents and Settings\Name\Mozilla\Profiles\default\46yhu2ir.slt. Look in the file for an entry that looks like this:
.doubleclick.net TRUE / FALSE 1920499138 id OPT_OUT
You can instead use Netscape’s built-in Cookie Manager to examine the cookie, by choosing Tools → Cookie Manager → Manage Stored Cookies.
Some other advertising networks let you opt out as well. For details, go to http://www.networkadvertising.org/optout_nonppii.asp and follow the instructions for opting out. To verify that you’ve successfully opted out of the other ad networks, click the Verify Cookies menu item on the left part of the page.
See Also
Surf Anonymously Without a Trace
Feel like people are watching you? On the Web, they probably are. Protect your privacy by using anonymous proxy servers.
Whenever you surf the Web, you leave yourself open to being snooped upon by web sites. They can track your online travels, know what operating system and browser you’re running, find out your machine name, peer into your clipboard, uncover the last sites you’ve visited, examine your history list, delve into your cache, examine your IP address and use that to learn basic information about you such as your geographic location, and more. To a great extent, your Internet life is an open book when you visit.
Don’t believe me? Head to http://www.anonymizer.com/privacytest/. This page, run by the Anonymizer.com web service, tells you your IP address and machine name. And that’s just a start. Click the links such as Exposed Clipboard and Geographical Location. You’ll see just a small sampling of what web sites can learn about you. Figure 4-12 shows a web site reporting on my IP address, the contents of my clipboard, my browser information, and my geographic location. It’s close enough; I live in Cambridge rather than Boston, and we generally require that people turn over their passports at the border.
Much of the reason why web sites can find out this information about you is due to the trusting nature of the Internet’s infrastructure and is inherent in the open client/server relationship between your web browser and the servers on the sites you visit. But a lot of it also has to do with the ability to match up information from your PC to information in publicly available databases—for example, databases that have information about IP addresses.
The best way to make sure web sites can’t gather personal information about you and your computer is to surf anonymously; use an anonymous proxy server to sit between you and the web sites you visit. When you use an anonymous proxy server, your browser doesn’t contact a web site directly. Instead, it tells a proxy server which web site you want to visit. The proxy server then contacts the web site, and when you get the web site’s page you don’t get it directly from the site. Instead, it’s delivered to you by the proxy server. In that way, your browser never directly contacts the web server whose site you want to view. The web site sees the IP address of the proxy server, not your PC’s IP address. It can’t read your cookies, see your history list, or examine your clipboard and cache because your PC is never in direct contact with it. You’re able to surf anonymously, without a trace.
There are two primary ways to use anonymous proxy servers. You can run client software on your PC, which does the work of contacting the server for you, or you can visit a web site, which does the work of contacting the server.
Web-Based Anonymizer
If you don’t want to go to the hassle of installing a client—and if you don’t want to pay for software—to surf anonymously, go to Anonymizer.com (http://www.anonymizer.com). In the box near the top of the page, type the name of the site to which you want to surf, and you’ll head there anonymously. The proxy server will grab the page for you, and you’ll get the page from the proxy server. You can also download a free version that runs as a toolbar in Internet Explorer. Surf as you would normally, and you’ll visit those web sites directly. When you want to visit a site anonymously, click a button and the anonymous proxy server will do the work for you.
A fuller version of the program is available on a subscription basis for $29.95 per year or $9.95 for three months. It blocks banner ads, stops pop ups, encrypts the URLs you type so that they can’t be read by your ISP or network administrator, and adds a few other features as well. I don’t find the extra features worth the money, but if these kinds of things are important to you, go ahead and spend the money. (To learn how to block pop ups, turn to [Hack #33] .)
Use Internet Explorer for Anonymous Surfing
If you want to surf anonymously, you don’t have to pay a service. With a bit of hackery, you can use Internet Explorer, or any other browser. To do it, you use an anonymous proxy server to sit between you and the web sites you visit.
To use an anonymous proxy server in concert with your browser, first find an anonymous proxy server. Hundreds of free, public proxy servers are available, but many frequently go offline or are very slow. To find the best one, go to http://www.atomintersoft.com/products/alive-proxy/proxy-list. The web site lists information about each server, including its uptime percentage and the last time the server was checked to see if it was online.
Find the server with the highest percentage of uptime. Write down the
server’s IP address and the port it uses. For
example, in the listing 24.236.148.15:80
, the IP
address is 24.236.148.15
, and the port number is
80
.
In Internet Explorer, select Tools → Internet Options, click the Connections tab, and click the LAN Settings button. Check the “Use a proxy server for your LAN” box. In the Address field, type in the IP address of the proxy server. In the Port field, type in its port number. Check the “Bypass proxy server for local addresses” box, as shown in Figure 4-13; you don’t need to remain anonymous on your local network.
Click OK and then OK again to close the dialog boxes. Now when you surf the Web, the proxy server will protect your privacy. Keep in mind that proxy servers can make surfing the Web much slower.
Get Software for Anonymous Surfing
If you prefer to install software, get Steganos Internet Anonym 5 (http://www.steganos.com/en/sia). In addition to anonymous proxy serving, it kills pop ups and manages cookies. You can try it for free, but if you want to keep it you’ll have to pay $29.95.
See Also
Go to http://www.gilc.org/speech/anonymous/remailer.html to send email anonymously so that it can’t be traced to you as the sender. Whistle-blowers might want to use this feature, but others should make sure not to abuse it.
For shareware that cleans out your cached files, destroys your history trail, and uses a variety of other methods to clean all traces of where you’ve surfed, try SurfSecret Privacy Protector (http://ww.surfsecret.com).
Don’t Get Reeled In by Phishers
Watch out the next time your bank, eBay, or PayPal sends you an email asking for account information; it might be a scammer on a " phishing” expedition that will send you to a web site to steal your account information. Here’s what you can do to make sure you don’t become the catch of the day.
Of all the obnoxious scams circulating on the Internet, the worst might be phishing attacks, in which you’re sent a spoofed email that appears to be from a bank, eBay, PayPal, or other financial institution. Often, the email address appears to be a valid email address, and the email includes the institution’s logo and looks exactly like any other email you might get from it. Many of the links in the email will lead to the real site as well.
The email tells you that you need to log into your account for some reason—perhaps to verify your personal information—although often, you’re told you need to log in because the institution’s fraud-detection team has found suspicious activity in your account and needs you to provide information about it.
These emails can be exceedingly convincing. For example, the email shown in Figure 4-14 looks real, but in fact, it isn’t from PayPal. If you click the link at the bottom of the message, you’ll be sent to a site that looks like PayPal.
The site shown in Figure 4-15 looks just like the regular PayPal site. With such fraudulent sites, the design and logo will be the same, and in some instances, even the URL will look authentic.
But the site is a fraud. When you log in, the phisher steals your username and password. Then he can empty the bank account associated with your PayPal account or use that information in identity theft to open up new accounts and take out new credit cards in your name.
How effective are phishing attacks? According to the antiphishing organization Anti-Phishing Working Group (http://www.antiphishing.org), up to five percent of people who get phishing emails are fooled into giving out their private information.
The problem is only getting worse. The Anti-Phishing Working Group says phishing expeditions are increasing at a rate of 50% per month. The research firm Gartner estimates that 57 million people in the U.S. have received a phishing email. And according to the Truste web site, $500 million was lost in 2003 alone due to phishing attacks.
Tip
It can be excessively difficult for law-enforcement officials to track down the source of phishing attacks. That’s because often, the emails aren’t sent directly by the scammers. Instead, the scammers use so-called zombie networks to send the phishing attacks. These networks are made up of hundreds or thousands of PCs, whose unwitting owners have no idea their PCs are being used in this manner. Trojans have been planted on them and are then used to send out the phishing attacks. The security firm Ciphertrust estimates that as few as five zombie networks are responsible for most of the phishing email on the Internet. The best way to protect against Trojans is to keep your antivirus software up-to-date and to use a personal firewall. For details about how to use a firewall, see [Hack 77] and [Hack #78] .
Increasingly, phishing attacks aren’t conducted by lone individuals. Instead, they are tied to organized crime. In November 2004, for example, a suspected member of the Russian mob was arrested for allegedly participating in phishing fraud.
What You Can Do About It
Phishing attacks are scary stuff, but you don’t have to be victimized. In fact, there are several things you can do to make sure you never get reeled in.
First, you can use a simple bit of JavaScipt code to find out the real URL of the site you’re visiting. Type the following JavaScript into your browser, and press Enter:
javascript:alert("Actual URL address: " + location.protocol + "//" + location.hostname + "/");
A small window will pop up in the middle of your browser, telling you the actual web site you’re visiting, as shown in Figure 4-16. Examine the URL, and you’ll see whether you’re really visiting the site you think you’re visiting. If the address in the window doesn’t match what you see in your browser, get thee somewhere else because it’s a phishing attack.
You can also use this JavaScript code, which will do the same thing as the previous code, but adds a little bit of extra information:
javascript:alert("The actual URL is:\t\t" + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is:\t\t" + location.href + "\n" + "\n If the server names do not match, this may be a spoof.");
As shown in Figure 4-17, this pop-up window includes the real URL of the site you’re visiting, as well as the URL displayed in the address bar.
Of course, it’s unlikely that you’re going to memorize either piece of code and have it on hand every time you visit a web site you worry might be a spoof. So, there’s a simpler solution. You can get a nifty, free add-in that will report to you on the real URL of the site you’re visiting.
SpoofStick (http://www.corestreet.com/spoofstick) is a free add-in to both Internet Explorer and Firefox that detects phishing attacks. It installs as a toolbar in either browser, so you can turn it on and off when you want. When you’re on a site and you’re not sure whether the site is a spoof, turn on the SpoofStick toolbar by choosing View → Toolbars → SpoofStick in either browser. The SpoofStick toolbar will appear, as shown in Figure 4-18, displaying the site’s real URL. If the site is a spoof, leave it as quickly as you can; you’re about to be victimized by a phishing scam.
You can customize the size and color of the “You’re On” message by clicking the Options button, choosing Configure SpoofStick, choosing the size (small, medium, or large) and color of the message, and clicking OK.
To turn off the toolbar, choose View → Toolbars → SpoofStick.
EarthLink, a popular Internet Service Provider (ISP), also offers a free antiphishing toolbar, though it works only with Internet Explorer, not Firefox. Head to http://www.earthlink.net/home/tools and download and install the EarthLink Toolbar. Whenever you visit a site that might be fraudulent, you’ll be redirected away from the phishing site and instead sent to the web page shown in Figure 4-19.
If you want to live dangerously by visiting the site even after receiving this warning, click the button at the bottom of the page that reads “Continue to this potentially dangerous or fraudulent site.” Even if you click, you won’t be sent there unless you also turn off the toolbar’s ScamBlocker feature (click the ScamBlocker button so that it turns red).
Tip
Even if you don’t have the EarthLink Toolbar turned on, it will still stop you from visiting phishing sites.
Which toolbar should you use? I prefer SpoofStick. EarthLink’s toolbar works by checking to see whether the site you’re visiting is on a list it has of potential spoof sites. And if you’re one of the first potential victims and the site hasn’t yet been added to the list, you’ll be allowed through, but you’ll think you’re safe.
Of course, the paranoid among us might prefer to use both.
Hacking the Hack
The tools in this hack will go a long way toward making sure you’re never the victim of a phishing scam. But you should also take these precautions as well:
Never respond to unsolicited mail from anyone purporting to be your credit card company, bank, eBay, or other financial institution; in other words, don’t click any links in those emails. Most financial institutions have gotten savvy to phishing scams, so they won’t send out emails with links to your log-on page. If you get a message that you think might be real, head to its web site on your own, not via an email link, or call your financial institution and speak with a representative.
Don’t enter your Social Security number on any web site, unless a reputable financial institution requires it for you to open an account. Again, enter your Social Security number only if you go to the site yourself to open an account, not in response to an email message.
Don’t fill out forms in email messages that ask for personal financial information or passwords. Again, the email can be forged.
To help protect others and set the law enforcement dogs on the phishers, forward the email to the Anti-Phishing Working Group at reportphishing@antiphishing.com, send a copy to the Federal Trade Commission at spam@uce.gov, and file a complaint with the FBI’s Internet Fraud Complaint Center at http://www.ifccfbi.gov.
See Also
Microsoft has a useful Knowledge Base Article that explains how to protect yourself against spoofed sites. Go to http://support.microsoft.com/default.aspx?scid=kb;en-us;833786. For advice on what to do if you’ve been victimized by identity theft, go to the Federal Trade Commission’s site about identity theft: http://www.consumer.gov/idtheft.
Read Web Pages Offline
Take the Web with you wherever you go, and put it into an easily searchable database on your PC.
One of the main problems with doing research on the Web is that there’s no easy way to save all the information you find and no simple way to read web pages when you’re offline. Internet Explorer includes some basic tools for saving web pages and reading through them when you’re not connected to the Internet. If you need to save only occasional pages and don’t need to do searches through those pages, these tools will work reasonably well for you. But if you want to store pages in categories and folders and need to do full-text searches, you’ll need a third-party program. This hack shows you how to do both.
Reading Web Pages Offline Using IE
To save your current web page to your hard disk so that you can read it again in Internet Explorer when you’re not connected to the Internet, choose File → Save As. You’ll be given several options for how to save it. If you’re not planning to edit the HTML of the file, your best bet is to save it as a “Web Archive, single file” (.mht). That way, you don’t clutter up your hard disk with extra folders and files stored in different locations; everything is saved to a single file. Saving it as a “Web Page, complete” stores the HTML file as well as associated graphics, in a folder structure. Saving it as a “Web Page, HTML only” saves just the HTML file itself, with no associated graphics and no folder structure. You can also save it as a text file, but if you do, expect to spend time cleaning it up because it saves all the text on the page, often in an unstructured way. To read the page after you’ve saved it to your disk, choose File → Open, browse to the directory where you’ve saved the page, and open it.
There are times when you want to save not just the page you’re on, but also the pages linked off it. To do that, you’ll have to save your pages another way. First, save the page to your Favorites list by pressing Ctrl-D or choosing Favorites → Add to Favorites. Then, right-click the page where it’s listed in Favorites and choose Make Available Offline. A wizard will appear. Follow its instructions, and when you get to the screen shown in Figure 4-20, tell it how many links deep you want pages saved. Be very careful when doing this, because even choosing to keep one link level can take up a substantial amount of hard-disk space.
When you finish the wizard, you’re asked how you want to synchronize the page or pages you’ve chosen to save to disk. When you synchronize a web page, IE grabs the latest version of the page or pages and overwrites your existing page or pages. If you want to keep a permanent copy of the page or pages, and you don’t want them updated, choose “Only when I choose Synchronize from the Tools menu.” Then, simply don’t synchronize the page. If you do want to synchronize the page so that a more current version is available on your hard disk, choose “I would like to create a new schedule,” and follow the instructions for creating a schedule.
Save Web Pages in an Offline Database with Add-Ins
If you need to save many web pages and want to be able to search through them by full-text or keyword searches, you’ll have to use a third-party program. A very good one is SurfSaver, available from http://www.surfsaver.com (see Figure 4-21). It integrates directly into Internet Explorer and lets you save pages in separate folders within the program. You can add keywords and notes to each page, and then search by keyword or full text, or browse by folder.
When you visit a web page you want to save locally, right-click the page, choose SurfSaver Save, and choose which SurfSaver folder you want to save it in. You can save the page with or without graphics. When you want to search, right-click the page, choose SurfSaver Search, and then search by keyword, through notes, or through the full text on the page to easily find the page and information you want. SurfSaver also integrates directly with the freeform askSam database. It’s shareware; you can try it out for free, but if you continue to use it, it costs $19.95.
My current favorite of these programs is Onfolio, shown in Figure 4-22. Like SurfSaver, it integrates with Internet Explorer, although it also integrates with Firefox, and it can work independently of a browser as well. It’s more visually pleasing than SurfSaver, makes it easier to organize your pages in folders and subfolders, and it includes excellent search tools. When you want to save a web page locally, press F9, or drag the address bar to Onfolio.
Onfolio is shareware, and is free to try, but it costs $49.95 if you decide to keep it. Get it from http://www.onfolio.com.
Hack Internet Explorer with the Group Policy Editor
XP Professional’s Group Policy Editor lets you tweak Internet Explorer in countless ways—from changing its logo and background, to changing its titlebar text, and beyond.
XP Professional owners have a reason to feel good about spending the extra $100 or so they forked over for their version of the operating system: the Group Policy Editor, available only in Professional, can make all kinds of secret tweaks to Internet Explorer. This tool, used primarily for setting network and multiuser policies and rights, can also be used to customize the way XP and Internet Explorer look and work. It makes it easy to customize many different aspects of Internet Explorer’s behavior and appearance from one central place, without having to edit the Registry or delve deep into menus, dialog boxes, and options. You can customize how Internet Explorer looks and works for each individual account on the machine, or just for a single account if there is only one.
That means you’ll be able to create customized versions of IE for a variety of different purposes. For example, you can create customized browsers for your children, or for a business if you run or administer a small business.
Run the Group Policy Editor by typing gpedit.msc
at a command line or in the Run box and pressing Enter. When it
opens, go to User Configuration\Windows Settings\Internet
Explorer Maintenance
. There are five categories of Internet
Explorer settings you can modify:
Browser User Interface
Connection
URLs
Security
Programs
To change individual settings, browse to any of the categories, then from the right pane choose the setting you want to configure—for example, the browser title. Double-click the setting, and then fill out the dialog box, such as the one shown in Figure 4-23, which lets you change Internet Explorer’s static and animated logos.
You can change quite a few settings with the Group Policy Editor. Next, we’ll take a look at what the best of each category can do.
Browser User Interface
As the name implies, this section lets you customize Internet Explorer’s interface. This section, as a whole, lets you create your own customized version of Internet Explorer. For example, you can create a version of IE specifically for one of your children—take a digital photo of her and use it as the background for the toolbar, crop a headshot photo of her and use it as the animated custom logo, and change the browser title to put her name on it. You can make three types of tweaks in this section:
- Browser Title
This option lets you customize Internet Explorer’s titlebar text, though only to a limited degree; you can add your name or your company’s name to a text string of “Microsoft Internet Explorer provided by.” For example, you can have the titlebar read “Microsoft Explorer provided by Preston Gralla.” When you do this, Outlook Express will have the same title as well. Because you need to have that initial text string, this isn’t a great hack unless you’re a computer manufacturer and want to brand the browser.
- Custom Logo
This setting lets you replace Internet Explorer’s static and animated logo with logos of your own. Note that to do this, you’ll first have to create the logos yourself. It’s easier to use the Group Policy Editor to change your logo than to use the Registry.
- Browser Toolbar Customizations
You can use your own bitmap as the background to the Internet Explorer toolbar. Additionally, you can delete the existing toolbar buttons and add buttons of your own. You don’t have to worry if the bitmap you want to use is not the same size as the toolbar. XP will accommodate it—for example, by tiling a graphic that is smaller than the toolbar so that it appears multiple times.
Connection
This section lets you customize Internet Explorer’s connection settings, which you would otherwise have to go to several places to set:
- Connection Settings
This lets you customize your existing Internet connection settings and import them for another use on the PC. It doesn’t have any use if you’re the only user of the machine; it’s intended to help you set up other accounts’ connection settings. If you have a network at home, for example, you could copy the settings from one machine to every other machine on the network.
- Automatic Browser Configuration
This is purely an administrator’s tool. It lets you automatically change browser configurations on users’ machines.
- Proxy Settings
This lets you tell Internet Explorer to use proxy servers. You can also set up proxy servers from within Internet Explorer. For more details on setting up proxy servers, see [Hack #77] .
- User Agent String
This lets you customize the user agent string that is sent to web sites whenever you visit them. The user agent string gives out basic information about your operating system and browser to the web site so that the site can better track usage statistics. Using this setting lets you append a specific text string to your PC’s user agent string.
URLs
This section is mainly for administrators, so if you don’t need administrative tools you can pretty much forgo it. If you are an administrator, it will let you specify IE settings for multiple machines, such as setting a home page for all, specifying a URL they will go to when Help is chosen, and populating their Favorites with those of your choice. If you run a small business, you can use these settings to build a business-specific browser for all your employees. For example, set the home page to be your company’s home page or populate Favorites with intranet pages or other pages your employees need to access regularly, such as benefits information:
- Favorites and Links
This lets you create a Favorites folder and links, or import them. It’s primarily an administrator’s tool, since it doesn’t add much extra functionality to the normal way you can manage Favorites.
- Important URLs
You can specify the starting page, create your own customized Search bar, and create a Help page that will display when someone clicks Help → Online Support. Again, this is primarily an administrator’s tool.
Security
Here’s where to set Internet Explorer security settings. You can change these settings from directly within Internet Explorer just as easily as changing them here—unless you need to change the settings for several accounts, in which case this is the place to go.
- Security Zones and Content Rating
You can customize both security zones and content ratings, which limit sites with objectionable content from being visited. This is primarily an administrator’s tool, since these settings can be edited easily from inside Internet Explorer by choosing Tools → Internet Options → Security and Tools → Internet Options → Content. But it’s ideal for parents who have networks at home and want to customize different security settings for their children’s computers. You can set a higher level of security for children’s computers and a lower level for parents’ PCs.
- Authenticode Settings
This lets you designate specific credential agencies and software publishers as trustworthy. This is primarily an administrator’s tool, since these settings can be edited easily from inside Internet Explorer by choosing Tools → Internet Options → Security and Tools → Internet Options → Content → Certificates.
Programs
Once again, this section is mainly for administrators. It lets you change default programs for multiple machines. So, for users who require only a simple email program, you can set the default to be Outlook Express. For other users, you can set it as Outlook or a third-party email program.
- Programs
This lets you change the default programs to be used for purposes such as email, HTML editing, and others. This is primarily an administrator’s tool, since these settings can be edited easily by choosing Tools → Internet Options → Security and Tools → Internet Options → Programs.
Speed Up File Downloads
Don’t wait any longer for slow file downloads. Use this free program to accelerate them, regardless of your connection speed.
No matter how fast your Internet connection is, it’s not fast enough. Whether it’s a pokey dial-up or a broadband connection, you always have complaints and you always have a greater need for speed.
This is particularly true when you’re downloading files, especially large ones. While there might be no way to physically change your connection speed, you can get the free Download Accelerator Plus (DAP) program from SpeedBit (http://www.speedbit.com) to speed up your downloads significantly, whether via FTP or HTTP.
The program accelerates your downloads in two ways. When you start to download a file, DAP does a mirror search of all the servers that carry the same file, identifies the fastest servers closest to you, and then starts downloading from those servers instead of the one you originally chose. It also sets up a multiconnection download, downloading portions of the file from multiple fast servers simultaneously and then reassembling the file when all the pieces are on your PC. This makes the most efficient use of your available bandwidth because normally there are pauses and hesitations when you download, and if you’re downloading with multiple connections there will be fewer of those pauses.
The program also resumes broken downloads; if for some reason your connection is broken, it’ll pick up where you left off when you next connect to the Internet. Also useful is the zip preview feature that lets you preview the contents of zip-compressed files before you download. And it’ll schedule downloads for you as well. For example, you can schedule downloads to take place overnight, when you’re away from your computer.
DAP is free, but the free version delivers ads inside the program. For $29.95 you can get a version without the ads that also includes a few minor extras, such as the ability to extract individual files from within .zip archives, instead of extracting the whole archive.
Secrets of Web Site Hosting with Internet Information Services (IIS)
XP Professional includes a free, built-in web server. If you’re planning on using it, check out these tips to improve your site’s performance, cut down on bandwidth, deliver pages faster, and reduce Page Not Found errors.
If you’ve wanted to host a web server but don’t want to go to the trouble of configuring a separate machine and server, XP Professional has help for you. Windows XP Professional comes with Internet Information Services (IIS) Version 5.1, which lets you host web sites and FTP sites and run a Simple Mail Transfer Protocol (SMTP) service for sending email. (The Home Edition doesn’t include any of these capabilities.) It’s not something you’ll use to build a substantial web site because it has some significant drawbacks. The web server and FTP server allow only 10 simultaneous connections, for example, and the SMTP server isn’t a full-blown mail server; it can act as only a relay.
Still, if you want to host a small web site for friends, family, or internal use for a small business, or if you want to build a “staging server” to test out sites before publicly posting them on a different server, IIS is a good bet.
IIS isn’t installed by default in XP Professional. To install it, choose Control Panel → Add or Remove Programs → Add/Remove Windows Components and, from the Windows Component Wizard that appears, highlight Internet Information Services (IIS) and click Details.
Administer your web site by using the Microsoft Management Console (MMC) IIS snap-in. Choose Control Panel → Administrative Tools and double-click Internet Information Services. The console tree, shown in Figure 4-24, shows the structure of your web and FTP sites and gives you control over those sites.
In this hack, I’ll assume you know the basics of building a web site with IIS, so I’ll instead clue you in to secrets of IIS.
Change the Directory and Do a Redirect
By default, IIS uses the C:\Inetpub\wwwroot directory for your web site. However, you’ll most likely want to change that directory to one that better matches your own PC setup. To change it, launch the MMC snap-in as detailed earlier in this hack, then right-click Default Web Site and choose the Home Directory tab, shown in Figure 4-25. In the Local Path box, type in or browse to the directory you want to use.
If you want to use a directory on another computer located on the network, select “A share located on another computer.” The Local Path box changes to Network Directory, and the Browse button changes to a Connect As button. Type in the directory information from the other computer, then click Connect As to use your logon credentials to use the network share.
This tab also lets you do a redirect of your web site so that when people visit your web site they’ll be redirected to another site. That site doesn’t have to be on your network; it can be any location on the Internet. This option is most useful when you move your web site to another URL but want those who use the old URL to be able to access it. To do a redirect, select “A redirection to a URL.” The screen will change to the screen shown in Figure 4-26.
You have three options for your redirect:
- The exact URL entered above
This redirects all traffic to the URL you specified.
- A directory below this one
This lets you force a redirect of a parent directory to a child directory. For example, if a person was to type http://www.mysite.com in his browser, and you wanted him to end up at http://www.mysite.com/pics, you’d choose this option and have the location http://www.mysite.com/pics in the “Redirect to” box.
- A permanent redirection for this resource
When this option is chosen, a “301 Permanent Redirect” message will be sent to the visiting browser. This can be used by some browsers to automatically update their bookmarks or Favorites list with your new site location.
Redirect Incorrect Incoming URLs
They’re the bugaboo of every web site administrator—people who mistype URLs and get the dreaded “404 The page cannot be found” error. For example, if a person wanted to visit http://www.gralla.com/mybio.htm, but instead typed http://www.gralla.com/myboi.htm into his browser, he’d get an error message. And I’d lose a visitor.
Solve the problem with URLSpellCheck for IIS (http://www.port80software.com/products/urlspellcheck/). It redirects misspelled URLs to the right page so that your visitors don’t get error messages. It fixes instances in which an extra character is put into the URL, characters are transposed, a character is missing, or the wrong character is typed. It will also fix instances when the incorrect extension is typed.
Tip
URLSpellCheck can’t fix problems when someone types in the wrong domain—for example, http://www.grala.com rather than http://www.gralla.com. Domains are handled by the Domain Name System (DNS), so add-in software can’t solve the problem. To solve it, you’d have to own the various misspellings of your domain and then have DNS redirect the visitor to the proper domain.
The program runs as a snap-in to the MMC. Highlight your web site in the MMC, right-click the Properties button, and click the URLSpellCheck tab. From there, you’ll be able to enable or disable the program.
URLSpellCheck is shareware and free to try, but if you use it for more than 30 days you’re expected to pay $49.95.
Use Caching for Better Performance
When you run a web site, three issues top your list of concerns: how to preserve bandwidth, how to reduce the performance load on your PC, and how to make the site load faster for visitors.
Here’s a three-for-one solution: use caching properly. When visitors come to your site, have them use cached images such as logos, navigation bars, and similar content from their own PC, instead of hitting your server every time. When you do this, after they retrieve the image for the first time, each subsequent time they need to get the image it’s retrieved from their own PC, rather than your server. Their pages load faster, your PC doesn’t have to serve up as much content, and you don’t use as much bandwidth.
To make sure your site uses caching, try CacheRight (http://www.port80software.com/products/cacheright/). Like URLSpellCheck, it runs as a snap-in to MMC. To use it, highlight your web site in MMC, right-click the Properties button, and click the CacheRight tab. From there, you’ll be able to enable or disable the program, as well as set options for how the cache should be used. The main option you’ll set is expiration policies for the cache—in other words, at what point the visiting browser should check your web site to see whether the content the browser has cached is old and needs to be updated. You set the amount of time, such as a week, and set when that time should start, either the last time the browser visited your site or the last time you modified the cached content. I prefer to use the start time as the last time I modified the cached content; that way, browsers won’t unnecessarily try to get content from my site.
CacheRight is shareware and free to try, but if you use it for more than 30 days you’re expected to pay $149.95.
See Also
The IISFAQ site (http://www.iisfaq.com) is a great source for tips, advice, and downloads related to IIS.
Surf the Internet Ad-Free
Cruising the Internet these days feels like a trip down the Las Vegas strip. Here’s how you can turn off the ads and surf in peace.
There once was a day when advertising on the Web was limited to relatively small, discreet banners ads at the top of pages.
Those days are gone. Now ads are everywhere—big ones embedded in the middle of the page, large ones running down the right column, and monster ones that seem to take up entire pages. Ads can be more than just annoying; web sites can also use them to track your surfing activities.
But you don’t have to put up with it. You can surf the Internet ad-free. There are several ways to do it: either use ad-blocking software, or do some hacking of your system for free. Either way, you’ll whack the ads.
Use a HOSTS File to Kill Ads
If you’re looking for a free way to kill ads, using a HOSTS file is a great solution. This technique takes advantage of the fact that few web sites host their own ads. Instead, they generally use ad servers that deliver the ads. There aren’t very many of these ad servers, so if you block those servers from delivering content to your PC, you’ll block most of the ads on the Internet.
First, some background about HOSTS files. When you type in a URL such as http://www.oreilly.com, your PC needs to translate those letters into a numeric IP address that it can understand, such as 208.201.239.37. Doing this is called name resolution. DNS servers on the Internet provide name resolution automatically and behind the scenes as you surf the Web.
When you type in a URL, before your PC contacts a DNS server it looks at a HOSTS file on your PC. If it finds the domain name and IP address there, it uses the IP address it finds. If it doesn’t find the domain name and IP address, it goes out to a DNS server. Because your PC first looks to the HOSTS file for name resolution, you can use that file to block ads.
The HOSTS file is a plain-text file you can create or edit with a text editor like Notepad. The file has no extension; it is named only HOSTS. You’ll find an existing HOSTS file in C:\Windows\System32\Drivers\Etc\HOSTS. (In Windows XP Professional, it is located in C:\Winnt\System32\Drivers\Etc\HOSTS).
Each line in the file consists of an IP address and a domain name, like this:
208.201.239.37 oreilly.com 216.92131.107 simtel.net
When you type in an address such as http://www.oreilly.com, your PC looks in the file, sees that its IP address is 208.201.239.37, and then sends you there.
Every HOSTS file also has one default entry:
127.0.0.1 localhost
127.0.0.1 is a special IP address called a loopback because it refers back to your local computer, not to the Internet or a network. It’s used by developers to test network software without having to be being physically connected to a network. But you can also use the loopback address to prevent web ads from displaying.
To use the HOSTS file to block ads, you edit the file by adding individual entries for each ad server, and then associating those entries with the loopback address—your own computer. So, when you visit a site with ads, your PC looks at the HOSTS file, finds the entry for the ad server, but never visits the ad server because it’s instead redirected to the loopback address. So, the ads are never displayed, and your travels aren’t tracked.
For each ad server you find, create a line in your HOSTS file, like this:
127.0.0.1 ads.doubleclick.net
Double-click is one of the largest ad servers on the Internet, so this entry will block a significant number of ads.
How to find ad servers? In your browser, right-click an ad and select Copy Shortcut. That’ll put the ad’s URL into the Windows Clipboard. Then you can paste it into your HOSTS file. Make sure to include only the domain name portion. So, for example, when you right-click an ad and copy its location, you might get a very long entry, like this:
http://ar.atwola.com/link/93182535/html?badsc=B0Q0AoVXYvX-nBcuskw4IZTGAt -b7n1Q2V6vctHpvtzTK5RxgZIq9FU6ESe4QfJ7ELVJ3ENBHgvUkPknRBjhXGQIU32DP3fv_uj-LT3lA5W -A3k5mRc7pQl6QXJ6G9mgrNblbJDXkPLBNqQXvIwmZby-bDLeZvaX9kP33Xk0XAO5jQ -u5hUSd4k7tpzXK8soyJBOZQ3lNAt5qcj8tMoKpLG_tKza0JSChRrO8af31JSM5 -UX69B1BFEpSfUmp4ZfT5XLEI35bYTQoHS6tbTvZRcK7C8YjgqxdH
In your HOSTS file, though, use only the domain name. So, this would be your entry in the HOSTS file:
127.0.0.1 ar.atwola.com
It can be almost impossible to compile a list of most of the ad servers on the Internet like this. And because the servers change constantly, you’d have to constantly try to keep it up-to-date. So, instead of trying to do it yourself, you can go to a web site that has a HOSTS file with hundreds of entries Go to http://everythingisnt.com/hosts, and you’ll see a page filled with HOSTS entries for ad servers. Copy and paste it into your own HOSTS file. (For more information about HOSTS files and ad blocking, see http://www.everythingisnt.com/hosts.html.)
How well does it work? Take a look at before-and-after screenshots. Figure 4-27 shows a CNN page with no ad blocked; Figure 4-28 shows the same page with the banner ad blocked by a HOSTS file. Also note that the browser’s built-in pop-up blocker blocked a pop up.
Use Ad-Blocking Software
The HOSTS file does a good job of blocking ads, but it’s far from perfect. If, for example, ads are being delivered from the same domain as the web page you’re visiting, ads won’t be blocked. Also, if the ad server is not on your HOSTS list, you won’t be able to block it. Furthermore, the technique might not block some of the more obnoxious ads on the Internet, such as Flash-based animations.
You can buy ad-blocking software for more effective ad blocking, or download free ad-blocking software. But you might not need to buy or download extra software because your software might already include it. For example, if you use the for-pay version of the ZoneAlarm firewall [Hack #78] , ad blocking is built in. To block ads, run ZoneAlarm, and click Privacy on the lefthand side of the screen. On the page that appears, in the Ad Blocking section, choose High to block all ads. Choose Medium to block most ads, but to allow banner and skyscraper ads (ads that take up the vertical column on the right side of a web page). You can also customize the types of ads to let through by clicking Custom and choosing which ads to block, and which to let through.
If you don’t have ZoneAlarm, the following free and for-pay programs block ads to varying degrees:
- Webwasher Classic
This free program blocks many types of ads, including banners and Flash animations. Get it from http://www.webwasher.com. When you get there, look for the Webwasher Classic area, and click the “Download free version” link.
- AdSubtract Pro
This is the most comprehensive ad killer you’ll find. It blocks pretty much every type of ad you can name, and can even filter out for-pay search listings on sites like Google. (For details, see the following section “Hacking the Hack.”) It’s shareware, and available at http://www.intermute.com/adsubtract. It’s free to try, but you’ll have to pay $29.95 if you decide to keep it.
- Pop-Up No-No
This free software, available from http://www.popupnono.com, will block pop ups, as its name implies, but also blocks Flash animation ads.
- Ad Muncher
This one uses an interesting technique to block ads: it filters HTML it receives from an ad server and replaces it with benign content. It’s shareware, and available at http://www.admuncher.com. It’s free to try, but you’ll have to pay $25 if you decide to keep it.
Hacking the Hack
The worst ads of all might well be the ones you don’t even realize are ads, but rather, are sponsored results in search engines that look much like regular results. But there is a way to filter out even these types of ads; you can use the Search Sanity feature in AdSubtract Pro.
When you use AdSubtract, Search Sanity isn’t turned on by default. But it’s easy to turn it on. Double-click the AdSubtract icon in the Windows system tray, choose Search Sanity, and check the boxes next to the search engines whose results you want to filter. Click OK, and sponsored results and ads will be banished. Figure 4-29 shows the normal Google search results; Figure 4-30 shows the Google page with the sponsored search results filtered out by AdSubtract.
See Also
Hack Firefox
The free browser Firefox has gained millions of adherents since its release because of its security features, customizability, and features that Internet Explorer lacks, such as tabbed browsing. Here’s a grab bag of hacks for powering it up.
Internet Explorer has some serious problems. Because it’s intimately tied to Windows XP, it’s become a favorite source of malware-writers, who use its security holes not just to harm the browser itself, but also to get into the guts of the operating system. And it has a variety of security holes that never seem to get plugged.
In addition, it hasn’t gotten a face-lift or significant new features for years (other than pop-up blocking in SP2), and it’s starting to show its age. It doesn’t, for example, let you browse the Web with tabs, letting you visit multiple sites simultaneously by putting each site in its own tab.
Because of this, the free, open source browser Firefox (available for download from http://www.mozilla.org/products/firefox), shown in Figure 4-31, has gained millions of followers. It’s more secure than Internet Explorer, includes features such as a pop-up blocker, lets you browse to multiple web sites using tabs, and much more.
Many people consider Firefox superior to Internet Explorer for another reason as well: it’s much more customizable, and hundreds of free add-ins are available that extend its power and features. In this hack, you’ll learn how to add new features with Firefox extensions, and how to hack the interface with a hidden style sheet.
Using Firefox Extensions
Perhaps the most remarkable feature of Firefox is its ability to use extensions. Extensions are free add-ins that give the browser all kinds of new features. Because Firefox is open source, anyone can write an extension, and developers all over the Internet have put their creativity to use. There are hundreds of them, and new ones are added every day (by the time you read this, more than 1,000 extensions could be available). They add a mind-boggling array of capabilities, such as telling you the real URL of a site you’re visiting so that you can’t be the victim of a phishing exploit; letting you navigate the Web using mouse gestures so that you can browse by moving your mouse rather than by clicking; blocking ads; and much more.
How to find extensions? In Firefox, choose Tools → Extensions → Get More Extensions. You’ll be sent to a web page that lists extensions by category, and also lists the most popular and most recent one. This is the official Firefox extensions site, but it’s not the only place you can find extensions. You can find them on other places on the Web as well, notably at http://texturizer.net/firefox/extensions and http://extensionroom.mozdev.org.
Browse to the extension you want to install and click Install. If you want more information about the extension before you install it, click the title of the extension, and you’ll be sent to a page with more information about it; from there, you can also download the extension (see Figure 4-32).
After you click Install, the screen shown in Figure 4-33 appears.
Click Install Now, and after several moments, the extension will be installed and will appear in your Extensions window, as shown in Figure 4-34. The extension won’t work yet; first you have to close Firefox and restart it.
When you restart Firefox, the extension will start working. Many extensions allow you to customize their options. So, immediately after installing an extension, you should do that. To customize the options for an extension, choose Tools → Extensions, select the extension you want to customize, and choose Options. If you want to uninstall an extension, select it, click Uninstall, and then click OK. You’ll have to close Firefox and restart for the extension to uninstall.
Hundreds of extensions are available, and everyone has their favorites. Here are a few of mine:
- Googlebar
This installs the equivalent of the Google toolbar in Firefox. (For more information about the Google toolbar, see [Hack #47] .)
- BugMeNot
Many web sites require free registration before you can read their content. This nifty add-in supplies you with login information and logs you into most of those web sites so that you don’t have to fill out registration forms.
- SpoofStick
A great antiphishing tool, SpoofStick displays the real URL of a web site you’re visiting so that you can’t be fooled by spoof sites. For more information about the tool and about stopping phishing attacks, see [Hack #37] .
- Autofill
When you buy online, or register with a web site, you have to fill out long forms, which can be tedious and time-consuming. With this extension, you click a button, and the form is filled in automatically.
- Mouse Gestures
Instead of clicking your way around the Web, you can use mouse gestures. Hold down the mouse button and make a gesture with your mouse, and you can open and close windows, navigate from page to page, and more. So, for example, to close a tab, you would hold down the right-mouse button and move the mouse in a reverse “L” motion, and the tab would close.
- Bandwidth Tester
What’s the true speed of your Internet connection? Install this extension and find out. Figure 4-35 shows it at work.
Hacking the Firefox Interface
It’s easy to apply themes to Firefox, which give it different colors and graphics. To apply a theme, choose Tools → Themes → Get More Themes, and you’ll be sent to a web site with many different themes. When you find a theme you want, click Install. For more information about a theme, click the title, and you’ll be sent to a page with more information, which sometimes includes a preview. You can install the theme from that page as well.
After you click Install, the theme will be available to use. Click Tools → Themes, choose the theme you want to use, as shown in Figure 4-36, and then choose Use Theme. You’ll have to restart Firefox for the new theme to take effect. If you want to uninstall a theme so that it’s no longer available, select Uninstall from the screen shown in Figure 4-36.
But Firefox lets you do more than just change the theme. You can also hack the interface. Firefox’s interface can be controlled by a cascading style sheet (CSS), a file that contains instructions on how Firefox should display. By editing that file, you can change Firefox’s appearance.
The file is named userChrome.css, and for it to work, it needs to be located in the folder C:\Documents and Settings\<Your Name>\Application Data\Mozilla\Firefox\Profiles\default.xxx\chrome, where <Your Name> is your XP account name, and the .xxx will be three random characters.
When you install Firefox, there is no userChrome.css file in that folder. Instead, you can find it in C:\Documents and Settings\<Your Name>\Application Data\Mozilla\Profiles\Default\xxxxxxxx.slt\chrome, where xxxxxxxx is a random collection of characters. Copy the file to C:\Documents and Settings\<Your Name>\Application Data\Mozilla\Firefox\Profiles\default.xxx\chrome. Once it’s there, you can edit it to change Firefox’s interface. It’s a plain-text file, so you can edit it with Notepad. Following are some of the hacks you can make by editing the file. If you don’t already have a userChrome.css, you can start off with a blank text file, and name it userChrome.css.
Note that it’s a good idea, when putting in this
code, to put in a reminder for yourself so that later on you remember
what it does. You have to tell userChrome.css to
ignore your reminder so that it doesn’t try to
interpret it as code. So, surround your comments with
/*
to begin and */
to end, like
this:
/* This is a comment */
Put your own graphic on the Firefox toolbar
If you don’t like the plain background of Firefox’s toolbar, you can put your own graphic there. Type the following into the userChrome.css file, and put the graphic you want to use—for instance, background.gif—in the same directory as userChrome.css:
/* Change the toolbar graphic */ menubar, toolbox, toolbar, .tabbrowser-tabs { background-image: url("background.gif") !important; background-color: none !important; }
Make it easier to find the active tab
When you use many tabs when you browse, sometimes it can be difficult to distinguish the active one. So, you can make that tab stand out more, and gray out the background tabs. Type the following into the userChrome.css file:
/* Change color of active tab */ tab{ -moz-appearance: none !important; } tab[selected="true"] { background-color: rgb(222,218,210) !important; color: black !important; } /* Change color of normal tabs */ tab:not([selected="true"]) { background-color: rgb(200,196,188) !important; color: gray !important; }
Change the width of the search bar
You can change the width of the search bar on the upper-right corner of Firefox. (To hack the search bar, see [Hack #44] .) You do it by specifying the width of the bar in pixels. This code tells the search bar to be 400 pixels wide:
/* Make the Search bar wider (in this case 400 pixels wide) */ #search-container, #searchbar { -moz-box-flex: 400 !important; }
Move the sidebar to the right
Firefox lets you use a sidebar when you want to view your history or your bookmarks. The sidebar displays on the left side when you choose View → Sidebar. If you prefer, you can have the sidebar appear on the right, by typing this code into the userChrome.css file:
/* Place the sidebar on the right edge of the window */ window > hbox { direction:rtl; } window > hbox > * { direction:ltr; }
Naturally, you wouldn’t necessarily use all these hacks in concert with one another. But you could, of course. Figure 4-37 shows what Firefox looks like after we’ve added the hacks to the userChrome.css file.
You can hack Firefox using the userChrome.css file in several additional ways. For more, go to http://www.mozilla.org/support/firefox/tips and http://www.mozilla.org/unix/customizing.html.
See Also
Build Your Own Firefox Search Engine
Firefox’s built-in search box lets you search Google from wherever you are. You don’t have to settle for that built-in searching, though, because you can build your own Firefox search engine plug-in to search through any site from the Google search box.
Take a look at the upper-right corner of your Firefox browser [Hack #43] . You’ll see a nifty search box called the Search Bar that lets you search Google by typing in a search term. Better yet, you don’t have to settle for searching just Google that way. You can search through other sites as well by installing a specific search engine add-in for that site to the Search Bar. So, instead of using Google to search the Internet, for example, you can use Ask Jeeves (http://www.ask.com) or A9 (http://www.a9.com).
And you’re not limited to search sites. You can also search through an individual site. So, for example, you can search through Amazon.com (http://www.amazon.com), eBay (http://www.ebay.com), Dictionary.com (http://www.dictionary.com), or the health site WebMD (http://www.webmd.com) from that box as well. All you need to do is find and add the right search engine plug-in.
To do so, click the down arrow next to the G in the search box, and choose Add Engines. You’ll be sent to http://mycroft.mozdev.org/download.html, which is a directory of hundreds of search engines you can use in Firefox. Browse or search until you find one you want; then click its link. You’ll get a dialog box like that shown in Figure 4-38, asking whether you want to add it to the Search Bar. Click OK, and it’ll be added.
To choose which search engine to use in the Search Bar, click the down arrow next to the G in the Search Bar and choose your search engine from the list. Then, type in a search term, and you’ll search using that engine. The engine will stay there as your default until you choose another one.
All that’s well and good. But why settle for a search engine that’s already been written? It’s not that hard to write a plug-in of your own.
To get started, open a new file in a text editor such as Notepad. Give it the name of the site for which you’re building a search engine, and give it the extension .src. In our instance, we’re going to build a search engine for searching the federal government’s White House site, so we’ll call it White House.src. Save it in the folder C:\Program Files\Microsoft Firefox\searchplugins\.
The first line of the plug-in should be the search tag
<search
, and the next line should indicate
which version of Netscape the plug-in was written for. Now, I know
Firefox isn’t Netscape, but both are based on common
code, called Mozilla, and for reasons not quite understandable, you
need to include the most current version number of Netscape. At the
time of this writing, it’s 7.1, so
that’s the version we’ll put here.
Enter the text version="7.1
" underneath the search
tag so that the first two lines of your file look like this:
<search version="7.1
Next, name your plug-in by using this syntax:
name="My Plugin
"
But replace My Plugin
with the name of the
plug-in you’re writing. In our instance,
we’re calling it White House
.
Now, describe your plug-in by using this syntax:
description="My Plugin - My First Search Plugin
"
Our plug-in now looks like this:
<search version="7.1" name="White House" description="Search www.whitehouse.gov"
Now you have to tell the plug-in what action to take when you type in
a search term and press Enter. What you’re doing
here is telling it how to search the site. To get this information,
go to the site for which you want to build a search engine. Do a
search, and look at the first part of the resulting URL, the portion
before the first question mark (?
).
That’s what will tell what action your search engine
should take. For the http://www.whitehouse.gov site, that first
part of the URL before the ?
is http://www.whitehouse.gov/query.html.
Here’s the syntax:
action="http://myplugin.faq/search
"
So, in our instance, the line looks like this:
action="http://www.whitehouse.gov/query.html"
Now you need to put in the name of the search form. This will be the name of the site you’re on, written with the following syntax:
searchForm="http://myplugin.faq
"
Again, in our instance, this is:
searchForm="http://www.whitehouse.gov"
Underneath that, put the following code:
method="GET"
This tells the plug-in to use the GET
method of
searching, which is the only method supported, so
there’s no choice here. After that line, close off
the search tag with a closing tag:
>
So, here’s what our plug-in looks like so far:
<search version="7.1" name="White House" description="Search www.whitehouse.gov" action="http://www.whitehouse.gov/query.html" searchForm="http://www.whitehouse.gov" method="GET" >
Now you need to add a line that tells the site’s webmasters and site administrators someone is searching the site using the plug-in. So, put in this line:
<input name="sourceid" value="Mozilla-search">
Next, you need to tell your plug-in what syntax to use when searching
for the text you’ll type into the Search Bar. This
varies from site to site. Again, take a look at the URL that results
after you search the site. Look for whatever falls between the first
ampersand (&
) and your search term. For the
http://www.whitehouse.gov site, it is
qt
.
Here’s the syntax for this line:
<input name="query" user="">
So, in our instance, the line looks like this:
<input name="qt" user="">
Now you need to close off the entire search section with a closing
</search>
tag:
</search>
Here’s what our final file looks like:
<search version="7.1" name="White House" description="Search www.whitehouse.gov" action="http://www.whitehouse.gov/query.html" searchForm="http://www.whitehouse.gov" method="GET" > <input name="sourceid" value="Mozilla-search"> <input name="qt" user=""> </search>
That’s it; you’re done. Close Firefox and restart it. Click the down arrow at the Search Bar, and your search engine plug-in will show up. Select it, type in your search term, press Enter, and you’ll search the site.
Hacking the Hack
When you right-click the down arrow on the Search Bar, you’ll see that many plug-ins have a small icon next to them. Yours doesn’t, however. That’s because you haven’t created an icon for it. Create a 16 16 pixel icon, give it the same name as your plug-in, and save it as either a .jpg or .png graphics file. Then, put it in the C:\Program Files\Microsoft Firefox\searchplugins folder. So, in our instance, we create one called White House.jpg.
For information about how to create icons, see [Hack #19] . You can also find ready-made icons in the right size, although not the right format, right on the Web. When you visit many web sites, you’ll see in your web browser a small icon to the left of the http://; that same icon might show up next to the http:// on your Favorites list because the sites use something called a favicon which the browser displays.
You can find the favicon for the site, save it to your PC, convert it
to .jpg or .png format, and
use it for your search engine plug-in. To find the favicon for a
site, go to
http://www.website
.com/favicon.ico,
where website
is the Favorite you want an
icon for. For example, go to http://www.oreilly.com/favicon.ico for the
O’Reilly icon. Keep in mind, though, that not all
web sites have favicons, so you won’t be able to do
this for every site.
If you’re using Firefox to get the icon, a dialog box will open, asking what to do with the file. Save it to your hard disk. If you’re using Internet Explorer, you’ll open the icon itself in your browser. Right-click it, choose Save Picture As..., and save it on your hard disk.
It’ll be in .ico format, so you need to convert it to .jpg or .png. An excellent program for doing this is IrfanView, available from http://www.irfanview.com. For details about how to do the conversion, see [Hack #99] . When you store the file, make sure it’s in C:\Program Files\Microsoft Firefox\searchplugins.
See Also
If you’d like, you can share your plug-in with others and have it available for download from the http://mycroft.mozdev.org/download.html site. To do so, you’ll have to add some code to your plug-in. For details, go to http://mycroft.mozdev.org/deepdocs/quickstart.html#firstplugin. The page also has more detailed instructions for creating your search plug-in.
Google Your Desktop
Google your desktop and the rest of your filesystem, mailbox, and instant messenger conversations—even your browser cache.
Not content to help you find things just on the Internet, Google takes on that teetering pile on your desktop—your computer’s desktop, that is.
The Google Desktop (http://desktop.google.com) is your own private little Google server. It sits in the background, slogging through your files and folders, indexing your incoming and outgoing email messages, listening in on your instant messenger chats, and browsing the Web right along with you. Just about anything you see and summarily forget, the Google Desktop sees and memorizes: it’s like a photographic memory for your computer.
And it operates in real time.
Beyond the initial sweep, that is. When you first install Google Desktop, it makes use of any idle time to meander your filesystem, email application, instant messages, and browser cache. Imbued with a sense of politeness, the indexer shouldn’t interfere at all with your use of your computer; it springs into action only when you step away, take a phone call, or doze off for 30 seconds or more. Pick up the mouse or touch the keyboard and the Google Desktop scuttles off into the corner, waiting patiently for it’s next opportunity to look around.
Its initial inventory taken, the Google Desktop server sits back and waits for something of interest to come along. Send or receive an email message, strike up an AOL Instant Messenger (AIM) conversation with a friend, or get a start on that PowerPoint presentation and it’ll be noticed and indexed within seconds.
The Google Desktop performs full-text indexes of:
Text files, Microsoft Word documents, Excel workbooks, and PowerPoint presentations living on your hard drive
Email handled through Outlook or Outlook Express
AIM conversations
Web pages browsed in Internet Explorer
Additionally, any other files you have lying about—photographs, MP3s, movies—are indexed by their filename. So, while the Google Desktop can’t tell a portrait of Uncle Alfred (uncle_alfred.jpg) from a song by “Uncle Cracker” (uncle_cracker_ _double_wide_ _who_s_your_uncle.mp3), it’ll file both under “uncle.”
And the point of all this is to make your computer searchable with the ease, speed, and familiar interface you’ve come to expect of Google. The Google Desktop has its own home page on your computer, shown in Figure 4-39, whether you’re online or not. Type in a search query just like you would at Google proper and click the Search Desktop button to search your personal index. Or click Search the Web to send your query out to Google.
But we’re getting a little ahead of ourselves here.
Let’s take a few steps back, download and install the Google Desktop, and work our way back to searching again.
Installing the Google Desktop
The Google Desktop is a Windows-only application, requiring Windows XP or Windows 2000 SP3 or later. The application itself is tiny, but it’ll consume about 500MB of room on your hard drive and works best with 400MHz of computing horsepower and 128MB of memory.
Point your browser at http://desktop.google.com, download, and run the Google Desktop installer. It’ll install the application, embed a little swirly icon in your taskbar, and drop a shortcut onto your desktop. When it’s finished installing and setting itself up, your default browser pops open and you’re asked to set a few preferences, as shown in Figure 4-40.
Click the Set Preferences and Continue button and you’ll be notified that the Google Desktop is starting its initial indexing sweep. Click the Start Searching button to get to the Google Desktop home page (Figure 4-39).
Searching Your Desktop
From here on out, any time you’re looking for something on your computer, rather than invoking Windows search and waiting impatiently while it grinds away (and you grind your teeth) and returns with nothing, double-click the swirly Google Desktop taskbar icon and Google for it. Don’t bother combing through an endless array of Inboxes, Outboxes, Sent Mail, and folders, or wishing you could remember whether your AIM buddy suggested starving or feeding your cold. Click the swirl.
Figure 4-41 shows the results of a Google Desktop
search for hacks
. Notice that it found 16 email
messages, 2 files, 1 chat, and 1 item in my IE browsing history
matching my hacks
query. As you can probably guess
from the icons to the left of each result, the first three are an AIM
chat, an HTML file (most likely from my browser’s
cache), and an email message. These are sorted by date, but you can
easily make a switch to relevance by clicking the
“Sort by relevance” link at the top
right of the results list.
Figures Figure 4-42 Figure 4-43, and Figure 4-44 show each individual search result as I clicked through them. Note that each is displayed in a manner appropriate to the content.
Click the “Chat with...” link shown in Figure 4-42 to launch an AIM conversation with the person at hand.
Cached pages are presented, as shown in Figure 4-43, in much the same manner as they are in the Google cache.
The various Reply, Reply to All, Forward, etc., links associated with an individual message result (Figure 4-44) work; click them and the appropriate action will be taken by Outlook or Outlook Express.
Google Desktop Search Syntax
It just wouldn’t be a Google search interface if there weren’t special search syntax to go along with it.
The Boolean OR works as expected (e.g., hacks OR
snacks
), as does negation (e.g., hacks
-evil
).
A filetype
: operator restricts searches to only a
particular type of file: filetype:powerpoint
or
filetype:ppt
(.ppt being the
PowerPoint file extension) find only Microsoft PowerPoint files,
while filetype:word
or
filetype:doc
(.doc being the
Word file extension) restrict results to Microsoft Word documents.
Searching the Web
Now you’d think I’d hardly need to
cover Googling—and you’d be right. But
there’s a little more to Googling via the Google
Desktop than you might expect. Take a close look at the results of a
Google search for hacks
shown in Figure 4-45.
Come on back when you’re through with that double take.
If you missed it, notice the new quick links “27 results stored on your computer.”
Yes, those are the same results (and then some, given my indexer was hard at work) returned in my earlier Google Desktop search of my local machine. As an added reminder, they’re called out by that Google Desktop swirl. Click a local result and you’ll end up in the same place as before: all 27 results, an HTML page, or Microsoft Word document. Click any other quick link or search result and it’ll act in the manner you’d expect from any Google search results.
Behind the Scenes
Now, before you start worrying about the results of a local search—or indeed your local files—being sent off to Google, read on. What’s actually going on is that the local Google Desktop server is intercepting any Google web searches, passing them on to the Google web server in your stead, and running the same search against your computer’s local index. Then it’s intercepting the web search results as they come back from Google, pasting in local finds, and presenting them to you in your browser as a cohesive whole.
All work involving your local data is done on your computer. Neither your filenames nor your files themselves are ever sent on to the Google web server.
For more on Google Desktop and privacy, right-click the Google Desktop taskbar swirl, select About, and click the Privacy link.
Twiddling Knobs and Setting Preferences
There are various knobs to twiddle and preferences to set through the Google Desktop browser-based interface and taskbar swirl.
Set various preferences in the Google Desktop Preferences page. Click the Desktop Preferences link on the Google Desktop home page or any results page to bring up the settings shown in Figure 4-46.
Hide your local results from sight when sharing Google web search results with a friend or colleague by clicking the Hide link next to any visible Google Desktop quick links. You can also turn Desktop quick-link results on and off from the Google Desktop Preferences page.
Click the “Remove results” link next to the Search Desktop button on the top right of any results page and you’ll be able to go through and remove particular items from the Google Desktop index, as shown in Figure 4-47. Do note that if you open or view any of these items again, they’ll once again be indexed and start showing up in search results.
Search, set preferences, check the status of your index, pause or resume indexing, quit Google Desktop, or browse the “About” docs by right-clicking the Google Desktop taskbar swirl and choosing an item from the menu, as shown in Figure 4-48.
When evaluating the Google Desktop as an interface to finding needles in my personal haystack, one thing sticks in my mind: I stumbled across an old email message I was sure I’d lost.
See Also
The Google Desktop Proxy (http://www.projectcomputing.com/resources/desktopProxy) takes desktop searching beyond your very desktop. A little proxy server sitting on your computer accepts queries from other machines on the network, passes them to the Google Desktop engine running locally, and forwards the results.
X1 (http://www.x1.com) is another desktop search engine. It searches through more types of files than Google Desktop, and lets you more easily fine-tune your searches. But it takes up more RAM and system resources, and costs $74.95 (you can download a trial for free). It’s also more difficult to use than the Google Desktop.
—Rael Dornfest
Out-Google Google with MSN Desktop Search
Think the Google Desktop is nifty? MSN Desktop Search leaves it in the dust and lets you fine-tune your PC searches to an amazing degree.
[Hack #45] shows all the ways you can use Google’s great desktop search tool to search through your computer in the same way Google lets you search through the Web.
Surprise! Microsoft has beat Google at its own game. MSN Desktop Search does a far better job of finding email and files on your computer because it hooks directly into Windows, Outlook, Outlook Express, and Microsoft Office and lets you search in ways you can’t with the Google Desktop. And it does more than that as well; once you find files or email, you can move them, delete them, copy them, respond to them—pretty much anything Windows lets you do. Google Desktop merely lets you view them.
Tip
At the time of this writing, you can download MSN Desktop Search at http://beta.toolbar.msn.com, but most likely it will be at a different location soon. Check http://www.microsoft.com for details.
In fact, this great search tool is one of the best utilities of any kind you can find, and it’s free.
Tip
Microsoft didn’t build MSN Desktop Search from scratch. The heart of the search tool is a program called Lookout created by a company that Microsoft bought. Microsoft changed and tweaked Lookout to build MSN Desktop Search.
At first blush, the Google Desktop and MSN Desktop Search have some basic similarities. MSN Desktop Search, like the Google Desktop, sweeps through your PC, indexing all your email, your files and folders, and your Outlook appointments and tasks. When you do a search, it searches through that index rather than through your PC, so search results are returned lightning-quick.
It performs full-text indexes of:
Text files, Microsoft Word documents, Excel workbooks, PowerPoint presentations, OneNote documents—in fact, all Microsoft Office documents—living on your hard drive
Email handled through Outlook or Outlook Express
All Outlook data, including contacts, your calendar, your tasks—pretty much the whole Outlook shebang
Keywords in the titles of music, image, and video files
Web pages on your computer, although not web pages that you’ve browsed to
Unlike the Google Desktop, it has a full-blown interface rather than a simple web page, as shown in Figure 4-49.
We’ll take a closer look at the interface later in this hack, but let’s reign ourselves in for now and take a look at installation.
Installing MSN Desktop Search
MSN Desktop Search is a free download that runs on Windows XP only. Installation is straightforward. Download it (see the note at the beginning of this hack) and run the installer. It will install itself in several places, including as a small input box on the taskbar and as a toolbar in Outlook.
When it’s on the taskbar, it appears as an input box with a butterfly to the left, as shown in Figure 4-50. In addition to that, in the Notification area (the far-right portion of the taskbar) you’ll see a small magnifying glass with a butterfly on it. That’s the indexer portion of the utility.
If it doesn’t pop open and ask you to set your preferences, set your preferences right away. The most important one concerns what it should index. For some odd reason, by default, it indexes your email and your My Documents folder only. That means it won’t be able to find anything on the rest of your hard disk, so rectify that oversight right away. On the taskbar, click the down arrow next to the small butterfly symbol, choose Options → Deskbar Options, and from the screen that appears click Desktop Search to bring up the screen shown in Figure 4-51. Select “Email and all hard disks” and check the box next to “Index email attachments” so that it indexes all the attachments in your email. Then click OK.
Now, click the magnifying glass with the butterfly on it in the Notification area, and choose Index Now. It will start indexing. It could take from an hour to the better part of a day to complete its index, depending on how many files you have and how fast your processor is.
Searching Your PC
When you want to search through your PC, click inside the search box shown in Figure 4-52 and type in your search term. (To instantly put your cursor in the search box, press Ctrl-Alt-M.) MSN Desktop Search literally starts searching with each keystroke and can display results as you type. As you type, the results pop up in a box, as shown in Figure 4-52.
This instant searching and sorting is great, but even more useful is what you can do once you find results. Right-click any result and you’ll get a menu that lets you take action on the file or message, depending on the file type or whether it’s an email. For example, as shown in Figure 4-53, if you right-click an email, you can open the message in Outlook, print it, reply to it, forward it, copy it, delete it, or move it to a different folder—the same options you have from inside Outlook. And Outlook doesn’t have to be running for you to do it; for example, if you want to read the message, Outlook will launch automatically.
Similarly, if you right-click a Word document, you get a much wider choice of options, as shown in Figure 4-54—in essence, the same set of options you’d get if you right-clicked the file in Windows Explorer.
This is the quick way to use the MSN Search Bar. If you want to get the full power of the tool, after you type in your search term, press Enter, or click the arrow to the right of the input box, and you’ll come to the screen shown in Figure 4-55.
Right-click any file and you get the same menu of options you get when the results pop up.
But this screen gives you far more options than that. Sort the results in different ways by clicking Title, Author, Date, Size, or Type, and sort them in ascending or descending order. Better yet, you can see your search broken down by category. Click Email, for example, and you’ll see all email-related results; click Music, and you’ll see any results in music files; click Documents, and you’ll see results in Microsoft Office documents; and so on.
Warning
Some people with two computers who copy their Outlook .pst file back and forth between them might run into problems with MSN Desktop Search; it might return multiple results of the same item. Some people copy their .pst file from one computer to the other so that they can always have the latest version of their Outlook data on whatever PC they’re currently using. But when you copy .pst files over one another, MSN Desktop Search might get fooled and list individual emails multiple times in a search. If that happens to you, your best bet is to rebuild your index. From MSN Desktop Search, choose Options → Desktop Options → Desktop Search, and click the Rebuild Index button. Your PC will be reindexed (which will most likely take several hours), and the new index will replace the old one, so you should no longer see multiple copies of the same item in the search results.
MSN Desktop Search Syntax
The true power of the program comes not in its basic searches—although those, as you can see, are quite powerful—but in the search syntax you can use. The syntax has been explicitly created to help you search through documents on your PC. So, unlike with the Google Desktop, you’ll be able to search inside specific folders. And you can also search by the author of a document, by the sender and recipient of email, and so on. And, of course, it can handle Boolean searches, so you can use OR, AND, wildcards, and so on.
Let’s say you want to find all email that was sent to you from Joe Metz, that had attachments, and that contained the word budget. You’d issue this search:
kind:email from:Joe Metz has:attachment budget
If you want to find every PowerPoint presentation in the Money folder with the word ROI in it, issue this search:
kind:presentation folder:Money ROI
Table 4-2 provides a more complete list of search syntax.
This is just a small sample of the syntax. For a more complete listing, click the arrow next to the butterfly icon on MSN Desktop Search, choose Help → Desktop Search Help, go to the Tips and Tricks section of Help, and click Advanced Query Reference.
Turning Indexing On and Off
There’s one thing Google Desktop has that MSN Desktop Search doesn’t, and that’s real-time indexing. In Google Desktop, after the initial indexing, your files and email are instantly indexed in real time as you create them or receive them. That’s not the case with MSN Desktop Search. After its initial indexing, it indexes only when your computer is idle. That means that when you do a search, it won’t include information added since the last indexing.
Tip
MSN Desktop Search will index Outlook or Outlook Express only when those programs are open, so open them if you want them indexed.
You can manually tell it to index while you’re working, however. Right-click the magnifying glass with a butterfly on it in the Notification area and choose Index Now. You’ll see the magnifying glass slowly flashing as it indexes, and it will continue to index as you work.
If you’re not sure whether your index is up-to-date, click the magnifying glass with a butterfly on it and choose Indexing Status. The screen shown in Figure 4-56 appears. You’ll see the total number of items that have already been indexed, and how many items are waiting to be indexed. To start indexing, click Index Now.
This screen also lets you tell MSN for how long it should wait while your PC is idle before it starts indexing your PC. From the drop-down box next to Snooze, choose the amount of time you want it to wait before indexing. Your choices are from 15 seconds to one day.
Warning
MSN Desktop Search doesn’t completely index all the content in large files. For files larger than 1MB, it indexes only the first 1MB. That means that if you’re searching, and the term you’re searching for is found only after the first 1MB of a large document, MSN Desktop Search won’t find it. At this point, there’s no way to change the option to completely index the contents of large documents.
Hacking the Hack
When MSN Desktop Search sits on the Taskbar, there’s one niggling annoyance that won’t go away. The butterfly image (which Microsoft insiders call a jellybean because it’s shaped like one) takes up precious Taskbar space, as does the small arrow to the right of it, as shown previously in Figure 4-50. They become a problem when you run a lot of programs at the same time. With the jellybean there, because there’s less space on the Taskbar, you won’t be able to see the tiles of all the programs that are currently running.
There’s a simple Registry hack that will kill the
jellybean and arrow, but still gives you the features of search.
First, run the Registry Editor
[Hack #83]
and go to
HKEY_CURRENT_USER\Software\Microsoft\MSN Apps\DB
.
Create a new DWORD
value called
Buttons
and give it a value of
1
. Exit the Registry.
Now, take MSN Desktop Search away from the Taskbar by right-clicking the Taskbar, choosing Properties, and removing the checkmark from MSN Deskbar. Then, right-click the Taskbar again, choose Properties, and put a checkmark next to MSN Deskbar. MSN Desktop Search will appear again on the Taskbar, this time without the jellybean, as shown in Figure 4-57.
See Also
Better Internet Searching from Your Desktop
Internet Explorer’s default search features are anemic at best. Do better Internet searching by installing a Google Toolbar and other specialized search toolbars and powering up the default search.
Was there ever a Web before Google? Yes, but it was a heck of a lot harder to find anything in it. Internet Explorer’s default search feature leaves a lot to be desired, not the least of which is its use of MSN Search instead of Google. But there’s a lot you can do to do better Internet searching from your desktop. You can get search toolbars that integrate into your browser, and you can customize the Internet Explorer search feature as well.
Google Toolbar
The best way to empower Internet searches is by installing special toolbars from two popular search engines, Google and Ask Jeeves. The Google Toolbar is the better of the two, and not just because it’s a better search engine. It also has several extra features.
The great thing about the Google Toolbar is, well, that it’s Google. It gives you all of Google’s functionality without even having to visit the site. To get the Google Toolbar for IE, go to http://toolbar.google.com and follow the installation instructions. It works only with Internet Explorer. Once you install it, you’ll be able to search Google without having to visit the search site; just type your search term in the toolbar. In fact, you even get an extra on the toolbar that you don’t get on Google itself—the PageRank feature that tells you how popular the current site you’re visiting is.
Tip
The Mozdev.org site (http://www.mozdev.org) has written a third-party Google Toolbar called the Googlebar (http://googlebar.mozdev.org) for use with Netscape 7/Mozilla browsers. It emulates most of the features of the Google Toolbar except for PageRank. If you’re a Firefox user, you can use a Googlebar extension [Hack #43] .
The best of the Google Toolbar’s features is that it lets you do a Google search through the site you’re currently on, a particularly useful tool if the site doesn’t have a search box, or if the search on the site is a poor one. In fact, I rarely use sites’ search boxes and prefer to use the Google Toolbar instead. Among other features, the Google Toolbar also lets you find sites related to the one you’re currently visiting, and it will translate foreign-language sites into English. The Google Toolbar will also highlight your search terms on the page results if you tell it to.
Tip
If you’re at the Google web site, you can do a targeted
search of only one specific site instead of the entire Web. In the
Google search box, type site:www.nameofsite.com
searchterm
. For example, if you want to search the
http://www.newscientist.com site for the
word “cloning,” type
site:www.newscientist.com cloning
.
You’ll get results showing all the web pages on the
site containing the word “cloning.”
For more Google tips and tricks, see Google
Hacks or the Google Pocket Guide
(both from O’Reilly).
Using the Google Toolbar is simplicity itself: type a search term into it and press Enter. If you want to search the current site instead of the entire Web, click a small button on the toolbar that pictures two pairs of googly eyes on a magnifying glass.
Tip
If you’d prefer to search Google directly from your desktop rather than from within your browser, there’s a workaround for you. Download the free program GAPIS from http://www.searchenginelab.com/common/products/gapis. To use it, you’ll need to get a Google developer’s key. You don’t actually need to be a developer to get a key, though, and it’s free. To get the key, go to http://www.google.com/apis/. The page recommends that you download the Google developer’s kit, but you don’t need to do that to get your free key. Instead, click Create a Google Account and follow the instructions. Once you have the account, you have to type the key into GAPIS the first time you use the program. After that, you’ll be able to do Google searches by running GAPIS rather than using the Google Toolbar or visiting the Google site.
If you’re concerned about your privacy, you should disable the PageRank option. When you enable this option, the Google Toolbar tracks the page you’re on. If the option is disabled, the Google Toolbar doesn’t track the page.
Tip
Yahoo! and Ask Jeeves both have similar toolbars. Find the Yahoo! Companion toolbar at http://toolbar.yahoo.com. In addition to letting you search Yahoo!, it includes other features, such as letting you check your Yahoo! mail account and blocking pop ups. The Ask Jeeves toolbar (http://sp.ask.com/docs/toolbar) lets you search Ask Jeeves regardless of where you are on the Web, and includes links for weather forecasts, news, and more.
Mastering the Search Companion
If you decide to forgo the Google and Ask Jeeves search toolbars, you still can do things to power up Internet Explorer’s Search Companion, which you get to by pressing Ctrl-E or clicking the Search button. Of course, first you’ll want to get rid of the cloyingly cute animated dog that normally appears, by choosing Change Preferences when the Search Companion appears and then choosing “Without an animated screen character.”
But the Search Companion has bigger problems than stray dogs. It
forces you through a step-by-step search, and, worse still, it
clutters up the search area with “sponsored
links” from advertisers. Type in the name
Preston
, for example, and you’ll
get sponsored links such as “Hotels near
Preston,” “Buy Fine Wines and Beer
at Libation.com,” and “Preston,
Idaho Travel Information.” No, thank you. I prefer
my search results straight up.
A better bet is to use what Microsoft calls the Classic Internet Search Companion, which previous versions of Internet Explorer used. From the Search Companion choose Change Preferences → Change Internet Search Behavior → With Classic Internet Search. You’ll have to close Internet Explorer and restart it for the changes to take effect. As you can see in Figure 4-58, it’s simpler and allows you to perform more focused searches, specifically for web pages, addresses, business names, and maps, as well as perform a previous search. Click the More button to search for pictures and definitions of words.
By default, Internet Explorer uses MSN as its search engine, but after you perform a search, if you don’t find what you want you can send the same query to other search engines by clicking “Send search to more search engines” and then picking the engine you want to use. You can also change the default search engine by opening the Search Companion, choosing Change Internet Search Behavior, scrolling down the page that appears, and choosing a new default search engine from the list of 13.
See Also
WebFerret by FerretSoft (http://www.ferretsoft.com) is free metasearch software that will send your search to multiple search engines simultaneously and display all the results, collated, in a single window.
Copernic Agent Basic, a metasearch tool from Copernic (http://www.copernic.com), lets you perform more-targeted searches by sending your search to specialized search engines in a variety of categories when you choose a targeted search.
Run Java Applets Without Crashes or Problems
To get the most out of surfing the Web, you need the most recent version of Java. That can be harder to get than you think, but this hack will show you how.
Running a Java applet when you visit a web site should be a no-brainer; click a link and the application should run. Unfortunately, XP users have found out that isn’t always the case. You might visit Java sites only to find that you can’t play games, log into interactive stock and weather sites, or do any of the other things Java can be used for.
Unfortunately, there’s no single fix for all Java woes. There are many potential causes, ranging from display errors, to running an old version of Java, and more. Here, though, are the primary ways you can fix Java on your machine.
Make Sure You Have a Java Virtual Machine (JVM) Installed
To run Java applets, you need a Java Virtual Machine (JVM) installed on your system. Microsoft and Sun have, in the past, had competing JVMs. Applets written for one JVM might or might not work with the other JVM.
To make things more confusing, Microsoft and Sun have been locked in a bitter legal battle about Java, which rivals the Jarndyce and Jarndyce court case at the center of Dickens’ novel Bleak House. Fully explaining the Microsoft/Sun fight would take about as many pages as Dickens’ 1,000-plus-page novel did. The upshot is this, however: because of a court ruling, Microsoft stopped distributing and supporting its JVM (which it calls Microsoft VM) in January 2004. And the Microsoft VM might or might not be enabled in your version of XP.
So, if you’re having problems with Java, the first thing to do is to see whether you have a JVM installed and whether you’re using the Sun version, the Microsoft version, or both versions. To see whether Microsoft VM is enabled, from Internet Explorer choose Tools → Internet Options → Security. Highlight the Internet Zone, choose Custom Level, and then scroll down until you come to the Microsoft VM section, shown in Figure 4-59.
If the Disable Java button is chosen, it means the Microsoft VM is disabled on your system.
To check whether you have the Sun JVM and whether it’s enabled, from Internet Explorer choose Tools → Internet Options → Advanced and scroll down. If you see a Java (Sun) entry with a checkbox next to it, as pictured in Figure 4-60, the Sun JVM is installed.
If you don’t have the Microsoft VM or the Sun JVM installed, the solution is simple: install and enable one of them. Because Microsoft stopped supporting its VM after January 2004, your best bet is to install the Sun JVM from http://www.java.com/en/download/windows_automatic.jsp.
If the Microsoft VM or the Sun JVM shows up (as in Figure 4-59 or Figure 4-60, respectively), but it’s not enabled, you’ll need to enable it. To enable the Microsoft VM, in the screen pictured in Figure 4-59 choose High Safety. That will enable the VM but will take security precautions against rogue Java applets. To enable the Sun JVM, select the checkbox under Java (Sun), as shown in Figure 4-60.
Uninstall Older JVM Versions
Your problem might be that you have an older JVM or Microsoft VM installed, and you need to update it. Go to http://java.sun.com and check the version number against the version number displayed in Figure 4-60. If your version number is older, you should install a newer JVM. Additionally, if you’re using the Microsoft VM, you might instead want to install the Sun JVM in its place, since Microsoft discontinued support for its VM.
People have reported problems when installing a newer JVM over an older one, so I suggest first uninstalling the old JVM or Microsoft VM and then installing the new one from http://www.java.com/en/download/windows_automatic.jsp. Unfortunately, uninstalling the Sun JVM or Microsoft VM is not a simple process and requires Registry editing as well as manually deleting files. Here’s how to do each.
Uninstalling an old Sun JVM
There’s good news and bad news about uninstalling an old Sun JVM. The good news is that it might go off without a hitch and take only a single step. The bad news is that you might not be so lucky, and then it’ll be time to head to the Registry.
To uninstall an old Sun JVM, choose Control Panel → Add/Remove Programs. Select the Java Runtime Environment entry, click Change/Remove, and follow the uninstallation wizard. The JVM will be—or should be—uninstalled.
Sometimes, however, even after you do that, the Java Runtime Environment entry remains in the Add or Remove Programs screen. Theoretically, this should not cause a problem—because the underlying JVM has been uninstalled—but it’s not clear whether in practice it will cause problems. So, you’ll be best off to remove the entry in the Add or Remove Programs screen. You’ll do it by deleting Registry entries and a folder.
Run the Registry Editor
[Hack #83]
and go to
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Uninstall
.
You’ll find many keys enclosed in curly brackets,
like this: {B7915B05-FC28-11D6-9D24-00010240CE95}
.
One of these keys is the Java uninstall Registry entry, and you need
to delete it. You won’t be able to know which entry
to delete by the key name because the keys aren’t
descriptive and each is a string of long numbers enclosed in curly
brackets. To find which to delete, you need to find the one that has
a DisplayName
with a String
value that starts with Java
, such as Java
2 SDK, SE v1.4.1_02
. To find out which key to delete,
search for the word Java
by pressing Ctrl-F in the
Registry, typing the word Java
, and then doing a
search for it. You’ll be brought to the key that
needs to be deleted. Before deleting the key, write down its entire
name because you’ll need it for the next step. Then
you’ll delete it.
Next, go to the uninstall folder for Java and delete that folder. Delete C:\Program Files\InstallShield Installation Information\{<Java 2 clsid key>}, where {<Java 2 clsid key>} is the value of the registry key you deleted. After you do that, when you restart Add or Remove Programs the Java entry will be gone.
Uninstalling the Microsoft VM
Uninstalling the Microsoft VM takes a bit of work as
well. From the Run box, enter the command RunDll32
advpack.dll,LaunchINFSection java.inf,UnInstall
.
You’ll get a warning box asking if you want to go
through with the uninstallation process. Click Yes to continue, and
reboot your PC when prompted.
After you reboot, delete these items:
The C:\Windows\java folder
The java.pnf file from the C:\Windows\inf folder
The jview.exe and wjview.exe files from the C:\Windows\system32 folder
The Registry subkey
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Java VM
The Registry subkey
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet
Explorer\AdvancedOptions\JAVA_VM
That will completely remove the Microsoft VM. Now you can install the Sun JVM from http://www.java.com/en/download/windows_automatic.jsp.
Change Your Display Settings
Java applets won’t run unless you have a minimum color setting of 256 colors. If you don’t use that minimum setting, you’ll crash when you visit a web page with a Java applet. To change your display settings, right-click the desktop, choose Properties → Settings, and in the Color Quality drop-down box choose a display setting of at least 256 colors.
If you use at least 256 colors and you still experience problems, the cause might be a buggy video driver. To help find out if this is the cause of the problem, change your current display settings to a lower resolution and color depth than you’re currently using—for example, bring it from 1,024 768 to 800 600, and the colors from Highest (32bit) to 256 colors. If that doesn’t solve the problem, you might have a display driver with bugs in it. Go to the manufacturer’s web site and download a new driver.
Get Windows XP Hacks, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.