Chapter 5. Browser Configuration

Table of Contents
Browsers
Browser-cache Interaction
Testing the Cache
Cache Auto-config
cgi generated autoconfig files
Future directions
Ready to Go

Browsers

Squid is the server half of a client-server relationship. Though you have configured Squid, your client (the browser) is still configured to talk to the menagerie of servers that make up the Internet.

You have already used the client program included with Squid to test that the cache is working. Browsers are more complicated to configure than client, especially since there are so many different types of browser.

This chapter covers the three most common browsers. It also includes information on the proxy configuration of Unix tools, since you may wish to use these for automatic download of pages. Once your browser is configured, some of the proxy-oriented features of browsers are covered. Many browsers allow you to force your cache server to reload the page, and have other proxy-specific features.

So that you can skip sections in this chapter that you don't need to read, browsers are configured in the following order: Netscape Communicator, Microsoft Internet Explorer, Opera and finally Unix Clients.

You can configure most browsers in more than one way. The first method is the simplest for a sysadmin, the second is simplest for the user. Since this book is written for system administrators, we term the first basic configuration, the second advanced configuration.

Host name

It's very important to use a proxy specific host name. If you decide to move the cache to another machine at a later stage you will find that it's much easier to change DNS settings than to change the configuration of every browser on your network.

If your operating system supports IP aliases you should organize a dedicated IP address for the cache server, and use the tcp_incoming_address and tcp_outgoing_address squid.conf options to make Squid only accept incoming HTTP requests on that IP address.

There isn't really a naming convention for caches, but people generally use one of the following: cache, proxy, www-proxy, www-cache, or even the name of the product they are using; squid, netapp, netscape. Some people also include the location of the cache, and configure people in a region to talk to their local cache. More and more people are simply using cache, and it's the suggested name. If you wish to use regional names, you can use something along the lines of region.cache.domain.example.

Your choice of port has already been discussed. Have a look at HTTP:port in the index for more information.

Internet Explorer 4.0

Select the View menu option Select Internet Options Click on the Connection tab Select Access the Internet using a proxy server Type in your hostname in the Address: field, and your chosen port in the Port: field. Internet Explorer can attempt to connect directly to the destination server if the URL you are going to is in the local domain (? I presume ?). You should turn this option on, so that local accesses are not cached, and do not pass through the cache server. If you have more than one domain, you will have to specifically change options so that all your domains are ignored, using the Advanced button.

In the advanced menu, you can configure per-protocol cache server/port pairs, or you can type in only the first proxy/port pair, and select Use the same proxy for all protocols. Although Squid doesn't normally work with SOCKS, it's rarely used, so you can probably use the same proxy for all protocols.

The main advantage of using the Advanced menu is the ability to specify which domains are to be connected to directly, rather than through the proxy server. If all your local sites' hostnames begin with intranet, you can simply put that into the box titled Do not use proxy for addresses beginning with. You can add more than one exception by using a semicolon (;) between entries.

You will probably wish to exclude all local sites too. Since the exception list allows you to use a * character for what is known as a wildcard match, you can add *.localdomain.example, and all hosts in your domain will be accessed directly. Many people access local sites by IP address, rather than by name. Since the exception list matches against the URL (??) these will still pass through the cache, and you will need to add an IP address range to the list of hosts to exclude: 192.168.0.* should do nicely.

To reduce the local browser cache space (as discussed in the Netscape section in the previous section):

View
Options
General
In the Temporary Internet files section, click the Settings
button.
Move the slider all the way to the left.

Since Squid-2.0 and above handle HTTP/1.1 correctly, you should also configure Internet Explorer to use HTTP/1.1 when communicating with the proxy server:

View
Internet Options
Advanced tab
Scroll down until you see HTTP 1.1 Settings
Tick Use HTTP 1.1 through proxy server

(? I believe that opera is the third most common browser ?) (? I don't have a machine with it on... since I run Linux?)