Preface

Web Site Cookbook is about building web sites that people will visit, use, bookmark, and revisit. It is the book I wish I had when I started building my first web site almost 10 years ago—a one-stop source for answers to the questions that come up when building a web site. In it, you'll find solutions to everything from choosing, registering, and protecting a site's domain name to keep spammers from harvesting the addresses you display on its pages.

Rather than being the authoritative volume on how to be a webmaster, web designer, web developer, or expert in any of the Internet's myriad technologies, acronyms, or buzzwords, the Web Site Cookbook instead shows you how all of those disciplines (and others) can be combined for a common purpose: serving and engaging—even delighting—an audience of visitors to your site. Without them, of course, your efforts will be for naught.

Producing and maintaining a web site requires both halves of your brain, as well as a closet full of hats for assuming the various roles you will take on to ensure the web site's success. In the course of bringing a site to life, you might find yourself playing strategic planner, interface designer, programmer, database administrator, quality assurance manager, and promotional guru—often in the same week. That's why this book strives to present a wide range of design-, coding-, and marketing-oriented solutions to real-life problems that come up regularly when creating and growing a web site.

Do not feel compelled to read this book from start to finish. Unless you're just getting started building web sites, you may find that your own knowledge will serve you just as well as the recipes on that subject. (But remember, even a gourmet chef needs a refresher now and then.) This book is intended to be a ready reference for the site builder who needs a quick solution to an immediate problem that falls outside of his area of expertise. For example, the designer who needs a crash course in document types or setting up a cron job, the programmer who needs advice on choosing a color scheme or clip art for a site, or the marketer who wants to set up a weblog or email newsletter.

Regardless of your abilities or the role you play in building a site, you share a common trait with millions of other people building and publishing web sites: you have a message in need of an audience and want to find that audience on the Internet. The Web Site Cookbook can lead the way in showing you how to publish a site that is not only a useful and attractive representation of the business, organization, or person behind it, but is also easy to build, maintain, and update.

Assumptions

This book assumes that you have a hands-on role in the creation and ongoing life of a web site. It will not help you decide if you should build a web site, what kind of web site to build, or whom to hire if you can't build it yourself. If you oversee or manage one or more web designers, web programmers or other web experts, you may find useful background information in the book's solutions. Their true value, however, will be apparent to those who can implement the solutions on a working web site.

Many of the more technical recipes—including those that cover server setup, dynamic web pages, and database techniques—overwhelmingly favor the open-source, or LAMP, approach. By LAMP, I mean Linux (or, more generally, Unix) for the server platform, the Apache web server, MySQL as database server, and the PHP scripting language. By far, most solutions are platform-agnostic and alternatives for the Windows Internet Information Server (IIS) platform worth mentioning are noted in the "See Also" sections of selected recipes.

You should have a working knowledge of HMTL code. Although WYSIWYG-oriented site builders will find much in this book that will help them improve their work, the code samples presented in many of the solutions are geared toward those who are comfortable reading and writing web page source code. On the other hand, several recipes describe server command-line instructions, JavaScript functions, and moderately complex PHP routines in a step-by-step method intended to help newcomers become more familiar with these common web techniques and technologies.

Get Web Site Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.