Banner ads are easy to see, which also means they're easy to ignore. Advertisers designed pop-up ads to get right in your face. Since a pop-up ad opens a new window that covers the web page you really want to see, you can't ignore it. This is like having an advertiser rush into your house, grab your head, and shove your face in front of the TV when a commercial plays.
Many websites, especially those offering pornography, pirated music and software, or hacker tools, may bombard you with multiple pop-up ads, as shown in Figure 19-4. Sometimes, if you shut down one pop-up ad, three more appear in its place, so that the only way you can disable all the pop-up ads is to shut down your browser completely. If you don't shut down all these pop-up ads, they can often flood your browser and freeze or crash your computer.
Pop-under ads are a bit more subtle. They also appear in little windows all over your screen, but they hide under—not on top of—your currently displayed web page. The moment you close your browser, those pop-under ads seem to appear magically, cluttering up your screen, and you probably won't have any idea which website opened them. Since pop-under ads don't intrude upon your browsing activities, advertisers believe they're more effective than pop-ups, which people swat away like pesky mosquitoes every time one appears.
Either way, the intrusive nature of both pop-up and pop-under ads can annoy people who might have been customers otherwise.
Advertisers create pop-up and pop-under ads using JavaScript, Dynamic HyperText Markup Language (DHTML), or Flash. To see how to create a simple pop-up ad in JavaScript, use an ordinary text editor (such as Windows Notepad), type the following in a new file, and save it under the name "home.htm":
<html> <head> <title>A pop-up and pop-under example</title> </head> <body> <script language = "JavaScript"> <!-- PopUp = window.open('ad.htm','ADVERTISEMENT','height=400,width=325,toolbar=no,direc tories=no,status=no,menubar=no,scrollbars=no,resizable=no'); //--> </script> <P> This is an example of a pop-up ad created using JavaScript. This is the HTML code that created this web page. </P> <IMG SRC = "HTML.gif"> </body> </html>
The above HTML code uses the window.open()
JavaScript command to load a second HTML file called ad.htm as a pop-up window, which appears as soon as someone loads the home.htm file in a browser. (You may have to turn off your browser's built-in pop-up blocker to view the sample ad.)
This HTML code also displays a graphic image called HTML.gif, which opens the NotePad window with the HTML source code, as shown in Figure 19-5.
The HTML code to create the ad.htm pop-up ad appears below:
<html> <head> <title>ADVERTISEMENT</title> </head> <body bgcolor="#FFFFFF" text="#000000"> <img src="fileshare.jpg" width="301" height="337"> <text> Buy a copy now! </text> <a href="http://www.nostarch.com"> No Starch Press</a> </body> </html>
This HTML code displays a graphic file called fileshare.jpg in the pop-up window with the title ADVERTISEMENT, along with the text No Starch Press as a hyperlink that points to the www.nostarch.com domain.
This JavaScript example will get stopped by most pop-up blockers. For another example of creating pop-up ads with JavaScript, visit http://icant.co.uk/articles/how-to-create-popunders or www.hypergurl.com/generators/popupads.html.
If you want to create a pop-up ad that can slip past pop-up blockers, but you don't want to bother writing JavaScript code yourself, you can try the JavaScript Coder (www.javascript-coder.com) program or the Pop-Up Maker (www.jvwinc.com/popupmaker.html) program, shown in Figure 19-6. The publisher of Pop-Up Maker, Jimmy's Value World, even claims that its program "was one of the first popup [sic] makers that could create popups which will bypass XP service pack 2 Internet explorer popup blocking utility."
Almost every browser can be set to block all pop-up/pop-under ads by default, although you may want to configure your browser to allow them on certain trusted sites. Figure 19-7 shows the dialog box options for blocking pop-up ads in Internet Explorer 6.
To avoid seeing banner ads, you can buy a program that will automatically refuse to load graphic images that link to other websites. Not only do these special ad-cleaning programs keep you from seeing annoying ads, but they can also speed up your browsing by eliminating the time it would take to load the graphic images associated with banners. Some popular banner ad-stripping and pop-up blocking programs include AdsCleaner (www.adscleaner.com), SuperAdBlocker (www.superadblocker.com), Ad Annihilator (http://adannihilator.com), Privoxy (www.privoxy.org), and Norton Internet Security (www.symantec.com).