Digesting Web Clients and Servers (TCP/IP) Part 2

Storing user information as cookies

Cookies are small files that Web sites use to keep track of visitors. A Web server may store one or more cookies on your local hard disk. For example, a Web page might ask for your postal code. The server stores the postal code and a unique ID number within a cookie file on your own computer. The next time you visit the Web site, the server knows where you live and the browser displays your local weather automatically. This list describes the two types of browser cookies:

✓ Temporary or session: Deleted whenever you exit your browser. Web servers also use temporary cookies to keep track of short-term information, such as items in your shopping cart.

✓ Persistent: Remains on your computer after you exit your browser. Web servers store information, such as your username and password, so that you don’t have to sign in every time you browse a particular site.

✓ Nasty: (Okay, so we tried to sneak one in!) Originates from Web sites that you might not even realize you visited. These hidden sites include advertisements, such as pop-up or banner ads that you didn’t request to see. Animations such as "Shoot the dinosaur in the left eye and win a lifetime supply of Dino Desserts" are especially appealing to anyone who isn’t aware that the Internet has quite a dark underbelly. Web predators use these cookies to track you for lots of reasons, from marketing purposes to searching for spam victims.


Managing cookies with your browser

All major browsers let you manage cookies, at least to block them or accept them. Some browsers have gone beyond simple cookie management and given you extra flexibility in how you handle cookies.

If you use more than one browser, you need to learn how to deal with cookies on each one. The good news is that the principles of managing cookies are the same, no matter which browser you use. The bad news is that each browser has a different way for you to point and click your way to the cookies. When you reach the cookie management page in a browser, remember that different browsers have different degrees of cookie control.

The Microsoft browser, Internet Explorer in its many versions, lets you manage cookies. Internet Explorer 8 gives you even more options for managing cookies. IE8 lets you specify which cookies to allow a Web server to store on your computer.

To change your privacy settings for cookies, follow these steps:

1. Choose ToolsOInternet OptionsOPrivacy.

2. Move the slider to your preferred level of cookie privacy.

Your choices range from blocking all cookies to accepting all cookies with four levels between these extremes.

Some Web sites don’t work if you’re too restrictive about blocking cookies.

Microsoft Internet Explorer (IE) privacy settings let you set cookie privacy in general and also for particular Web sites. For example, if you want to block all cookies except from one Web site, you block all cookies using the preceding general steps. Then you customize those general cookie settings for the specific Web sites where you accept cookies.

Using Microsoft IE8, you customize cookie settings for an individual Web site by following these steps:

1. Choose ToolsOInternet Options and then, on the Privacy tab of the Internet Options dialog box, click the Sites button.

Figure 11-3 displays a list of blocked sites on our computer.

2. Type the complete URL of the Web site where you want to customize settings.

3. If you want IE8 to allow a server to store cookies from the specified Web site on your computer, click Allow. If you want IE8 to block a server from storing cookies on your computer, click Block.

4. Click OK.

This computer always blocks lots of cookies.

Figure 11-3:

This computer always blocks lots of cookies.

You manage cookies on most browsers by following the same principles as you use in IE. The menu choices and tabs you click vary from browser to browser.

For example, on the Safari browser (from Apple Computer), follow these steps:

1. Choose EditOPreferencesOSecurity.

2. In the Accept Cookies section, choose how you want Safari to handle cookies. Click Help to see the available options.

When you select the Show Cookies option, Safari shows you complete cookie information (see Figure 11-4):

✓ The name of the Web site that stored the cookie

✓ The name of the cookie

✓ The location on your computer where the Web server stored the cookie

✓ The cookie’s security status (cookies marked Secure are sent over an encrypted connection)

✓ The expiration date (when the cookie will be deleted)

✓ The content (normally a string of code)

Some cookies never expire.

As in most browsers, if you set Safari to block cookies, you might need to accept cookies temporarily to view a Web site. Repeat the cookie management steps (refer to Figure 11-4), but in Step 2 select Always instead. When you’re done with the page, turn off cookies again and manually delete the page’s cookies.

Too many cookies can give you an upset stomach.

Figure 11-4:

Too many cookies can give you an upset stomach.

To delete cookies manually, follow these steps:

1. Choose EditOPreferencesOSecurityOShow Cookies.

2. Select one or more cookies and click Remove, or click Remove All.

3. Click Done.

Dishing up multimedia over the Internet

Most people, even Internet newbies, have probably heard about multimedia on the Web — listening to audio, watching animations and videos, playing 3-D games, and even attending conventions and training seminars. Life online is more enjoyable when you can access more than words and pictures.

The Internet, compliments of TCP/IP protocols, lets you listen to CD-quality music with a click of your mouse. The MP3 file format shrinks digital audio files (which are usually quite large) while preserving audio quality. You can download MP3 music fairly quickly. One minute of music is about 1 megabyte, so an average song is about 4 megabytes. Using our cable modem, it takes only seconds to download MP3 files. To play a song, you need an MP3 player, usually bundled with your operating system. If you don’t have or don’t like your built-in player, try a free one, such as the free WinAmp high-fidelity player (www.winamp.com).

Sound and videos use lots of hard drive and memory space on your computer. You need hardware power. Some of the recommendations we see on the Web are ridiculously low. You need a broadband connection and lots of memory (no less than 1 gigabyte) to watch videos.

Multimedia also uses plug-ins. Your browser uses this type of software to turn your computer into a radio receiver, television set, or meeting place.

If you browse a Web page that uses a plug-in you don’t have, you usually see a message asking whether you want to download it immediately. If you use lots of plug-ins, create a folder to store them in the same place.

The Microsoft Internet Explorer browser uses ActiveX controls rather than plug-ins. The controls perform much the same tasks as plug-ins do.

Table 11-1 lists some popular, free multimedia plug-ins.

Table 11-1

Plugging In with Free Plug-Ins

Plug-In Name

What It s Used For

Web Site for Download

Adobe Reader

View and print Adobe Portable Document format (PDF) files.

www.adobe.com

Flash Player

Watch vector graphics and animation, including cartoons, interactive seminars, and comedy routines.

www.adobe.com

Multimedia apps for Linux

Watch QuickTime movies, listen to music, and lots more.

www.linux.org/ apps/all/ Multimedia/ Video.html

RealPlayer

Listen to radio or watch TV from around the world.

www.real.com

Shockwave

Enjoy interactive Web content, such as games, presentations, and entertainment.

www.adobe.com

Packets stream over the Internet using either the TCP protocol over port 1755 or the HTTP protocol over port 80. TCP provides the highest performance. HTTP works fine but is slightly less efficient than TCP because of the HTTP overhead. Multimedia streams because your browser receives the data in a continuous stream from the server so that you don’t have to wait to download large multimedia files.

Feeding Web Pages with Atom and RSS

Syndicated Web feeds are an optional way of seeing a Web page. Web sites, such as news sites, often use syndication pages, which list recent articles by displaying a line or two of each article’s content. The page also includes a link to the complete article. Web sites can have more than one syndicated feed. For example, a newspaper’s Web site may have separate feeds for news, sports, finance, and entertainment.

Two syndication protocols are described in this list:

✓ Atom Publishing Protocol, or AtomPub: Finding a Web page with the Atom icon is difficult because of the wide acceptance of RSS. If you’re looking for an Atom feed, look for an icon that’s similar to the symbol for an atom. As with RSS, you click the icon to open the syndication page.

✓ Really Simple Syndication, or RSS: Sites that offer RSS feeds show the RSS icon, a small button that looks like an orange box with either white stripes or the letters XML (see Figure 11-5.) When you press the orange button, the Web site displays a page where you can sign up for feeds. The New York Times page lists almost 30 main categories of feeds, from Home and Garden to Obituaries. Most categories list several subcatego-ries.

Click an RSS icon to sign up for a feed.

Figure 11-5:

Click an RSS icon to sign up for a feed.

Syndication skirmishes

Atom Publishing Protocol, or AtomPub, is the Internet standard for syndicating Web feeds — you can find five RFCs detailing it. In terms of standards, RSS is built on standards, but there’s no RFC for RSS. It’s a dialect of XML, which is defined by both an RFC and an official W3C Recommendation. To add to the confusion, RSS dates must conform to the RFC Date and Time Specification. And, another standards group is rearing its head — the RSS Advisory Board (www.rssboard.org). As of this writing, RSS is more widely used than AtomPub.

RSS feeds can be addictive, so don’t be greedy. The thing is, who has time to read all of them? As you can see in Figure 11-6, he subscribes to several RSS services. He also has almost 500 unread articles, with more automatically arriving every day.

You can receive these news feeds by way of RSS or AtomPub.

Figure 11-6:

You can receive these news feeds by way of RSS or AtomPub.

Be selective!

Next post:

Previous post: