Mimsy Were the Borogoves

Hacks: Articles about programming in Python, Perl, PHP, and whatever else I happen to feel like hacking at.

Webmaster in a Nutshell

Jerry Stratton, January 27, 2002

The book’s sections all assume basic understanding of the material: this is just the reference for once you have the understanding. It lists just about every statement or command you’ll need to use as a hands-on webmaster. The latest edition drops Perl and adds Cascading Style Sheets and PHP. This was a bit of a disappointment for me, but honestly, I’ve also had the Perl Pocket Reference on my desk for the entire period I’ve owned “Webmaster in a Nutshell”. PHP is, in my opinion, a much easier-to-use web scripting language for most webmasters. Perl, however, is much more useful for web site management; another 30 pages or so should have been kept.

The reference material covers everything from HTTP, the “language” of web servers and clients (more specifically, the “protocol” that guides web clients to request web pages, and web servers to give them), to HTML, to generating dynamic documents. The HTTP section lists the various response codes (such as the infamous 404, meaning the document--usually a file--doesn’t exist), the headers and what they contain, and the means of requesting documents. Some headers are useful for checking; some are useful for setting. You can set some headers by using meta tags in your HTML pages, for example. Others you can only set by using a programming or scripting language like PHP. Headers let you specify that files have moved--and why they’ve moved and where they’ve moved to.

The HTML section includes frames, tables, and forms.

The javascript reference provides quick access to the javascript functions available for use on web browsers. The PHP reference provides quick access to the PHP functions available for use on web servers. Each scripting language, and the choice of whether to execute on the server or on the browser, has its benefits and issues.

The book’s content is heavily weighted towards the Apache web server. PHP, for example, is most commonly employed as an add-on to Apache. An Apache server configuration reference, including configuration of .htaccess files, is included in the book. You can use .htaccess files, for example, to set up password-protected areas of your web site, or to make error pages that guide the user to finding what they were looking for. Apache’s server-side includes, also included, let you perform dynamic functions without having to learn a full scripting language. The book also includes a reference for Perl’s CGI.PM module, which has many useful features for creating dynamic web pages.

One interesting feature, new to the second edition, is a section on optimizing your web server and pages: how to increase the performance of your server, and includes such simple tips as always using the correct URL when linking to pages on your site (you’d be surprised at how many people leave off the trailing slash on directories, resulting in the server having to tell the browser to correct the error and re-request the page). The performance tips cover the HTML you use, the server configuration, and the hardware configuration.

Except for Perl, the book is a handy reference containing everything you need to manage and create web sites, and strongly recommended. Once you know web creation, you’ll find that this is the perfect reference for your day-to-day site management needs.

Contains: HTML, CSS, XML, CGI, JavaScript, PHP, HTTP, Apache, mod_perl, CGI.PM, Apache SSI. (Note that this is a review of the first edition, and the third edition is now available.)

  1. <- HTML Definitive Guide
  2. Code in HTML ->