Skip to Main Content
Linux Desktop Hacks
book

Linux Desktop Hacks

by Nicholas Petreley, Jono Bacon
March 2005
Beginner to intermediate content levelBeginner to intermediate
342 pages
15h 55m
English
O'Reilly Media, Inc.
Content preview from Linux Desktop Hacks
194
|
Chapter 8, Desktop Programs
#61 Eliminate Annoying Browser Stalls
HACK
This tells your computer to check the DNS first, and if it cannot find the IP
address from the DNS, to try looking up the IP address in your local file
called /etc/hosts.
If the line looks more like the following, it checks the local file /etc/hosts
first, and then checks with a DNS if it can’t find the IP address from your
local file:
hosts: files DNS
In most cases, browsers are slow to load pages or stall on something such as
a graphical element, because the DNS is having trouble resolving the
domain name into an IP address.
Short-Circuit the DNS Request
You can short-circuit this process in a few steps. First, make sure the line in
your /etc/nsswitch.conf file looks like the latter example, where
files pre-
cedes
DNS. If your /etc/nsswitch.conf file places something other than files
first, rearrange the order to make sure files comes first.
Next, determine the domain name that is causing your browser to load a page
slowly or get stuck loading a web page element. Here’s how to track down the
troublesome site. Keep your eye on the status bar in your browser. If you are
experiencing the kind of problem I’ve been describing, the status bar usually
reads something like “Looking up www.someadvertisementsite.com” or “Wait-
ing for www.someadvertisementsite.com” while is it slow or stuck. The status
message won’t change until it can ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Server Hacks, Volume Two

Linux Server Hacks, Volume Two

William von Hagen, Brian K. Jones
Introducing Linux Distros

Introducing Linux Distros

Jose Dieguez Castro

Publisher Resources

ISBN: 0596009119Supplemental ContentCatalog PageErrata