Webmaster in a Nutshell, Second Edition

Book description

Individuals, organizations, and businesses are relying on their web pages to provide and collect information, manage processes, and interact with communities and customers. A reliable, informative, and responsive web site can reduce cost, increase visibility, and create a positive image for the owner of that site. Behind every successful web page is an overworked and underappreciated webmaster. Webmasters make sure that the information on a site is accessible and usable; that the site is always available; that performance is good; that users can get the information that they need; and that the site can collect the information it needs to serve those users. These disparate tasks require many different tools and skills. Webmaster in a Nutshell pulls together in a single volume all the essential reference information for webmasters working on UNIX-based web servers. In this second edition of Webmaster in a Nutshell, we've updated our material to include the latest versions of HTML and Javascript, and also expanded the book to cover the newest technologies emerging on the Web. The book covers:

  • HTML 4.0, with special attention to forms, tables and frames

  • CSS (Cascading Style Sheets)

  • XML, the next-generation markup language for the Web

  • CGI, with a chapter dedicated to the Perl module CGI.pm

  • JavaScript 1.2

  • PHP, the HTML-embedded programming language

  • HTTP 1.1, the underlying protocol that drives the Web

  • Apache server administration, including Apache modules

  • mod_perl, the Apache module for enhancing CGI

  • performance and providing a Perl interface to the Apache API

Webmaster in a Nutshell, part of the bestselling O'Reilly series of reference books, makes it easy to find the information you want about the technologies you use. You'll keep your other books on the shelf; you'll keep Webmaster in a Nutshell next to your keyboard.

Publisher resources

View/Submit Errata

Table of contents

  1. Webmaster in a Nutshell, 2nd Edition
    1. Preface
      1. Contents
          1. Part I
          2. Part II
          3. Part III
          4. Part IV
          5. Part V
          6. Part VI
          7. Part VII
          8. Part VIII
      2. Conventions Used in This Book
      3. Request for Comments
      4. Acknowledgments
    2. 1. Introduction
      1. The Web in a Nutshell
        1. Clients and Servers
        2. Uniform Resource Locators (URLs)
        3. Web Content: HTML, XML, CGI, JavaScript, and PHP
        4. The HTTP Protocol
        5. Web Server
      2. Who Are the Webmasters?
      3. Recommended Books
    3. I. HTML
      1. 2. HTML Overview
        1. HTML Document Structure
        2. HTML Syntax
        3. JavaScript Event Handlers
          1. Standard Event Handler Attributes
          2. Mouse-Related Events
          3. Keyboard Events
          4. Document Events
          5. JavaScript URLs
      2. 3. HTML Reference
        1. Core Attributes
        2. HTML Tag and Attribute Descriptions
          1. <a>
          2. <abbr>
          3. <acronym>
          4. <address>
          5. <applet>
          6. <area>
          7. <b>
          8. <base>
          9. <basefont>
          10. <bdo>
          11. <bgsound>
          12. <big>
          13. <blink>
          14. <blockquote>
          15. <body>
          16. <br>
          17. <button>
          18. <caption>
          19. <center>
          20. <cite>
          21. <code>
          22. <col>
          23. <colgroup>
          24. <comment>
          25. <dd>
          26. <del>
          27. <dfn>
          28. <dir>
          29. <div>
          30. <dl>
          31. <dt>
          32. <em>
          33. <embed>
          34. <fieldset>
          35. <font>
          36. <form>
          37. <frame>
          38. <frameset>
          39. <hn>
          40. <head>
          41. <hr>
          42. <html>
          43. <i>
          44. <iframe>
          45. <ilayer>
          46. <img>
          47. <input>
          48. <input>
          49. <input>
          50. <input>
          51. <input>
          52. <input>
          53. <input>
          54. <input>
          55. <input>
          56. <input>
          57. <ins>
          58. <isindex>
          59. <kbd>
          60. <keygen>
          61. <label>
          62. <layer>
          63. <legend>
          64. <li>
          65. <link>
          66. <listing>
          67. <map>
          68. <marquee>
          69. <menu>
          70. <meta>
          71. <multicol>
          72. <nobr>
          73. <noembed>
          74. <noframes>
          75. <noscript>
          76. <object>
          77. <ol>
          78. <optgroup>
          79. <option>
          80. <p>
          81. <param>
          82. <plaintext>
          83. <pre>
          84. <q>
          85. <s>
          86. <samp>
          87. <script>
          88. <select>
          89. <server>
          90. <small>
          91. <spacer>
          92. <span>
          93. <strike>
          94. <strong>
          95. <style>
          96. <sub>
          97. <sup>
          98. <table>
          99. <tbody>
          100. <td>
          101. <textarea>
          102. <tfoot>
          103. <th>
          104. <thead>
          105. <title>
          106. <tr>
          107. <tt>
          108. <ul>
          109. <var>
          110. <wbr>
          111. <xmp>
      3. 4. Frames
        1. Frame Layout
        2. Nested Framesets
        3. The <frame> Tag
        4. Frame Targets
        5. Frame Border Attributes
      4. 5. Tables
        1. The <table> Tag
        2. The <caption> Tag
        3. The <tr> Tag
        4. The <th> and <td> Tags
          1. Cell Spanning
        5. Border Color and Backgrounds
        6. Advanced Table Tags
          1. Table Section Tags
          2. Column Grouping
      5. 6. Forms
        1. The <form> Tag
        2. The <input> Tag
          1. Password Fields
          2. File-Selection Fields
          3. Checkboxes
          4. Radio Buttons
          5. Submission Buttons
          6. Reset Buttons
          7. Custom Buttons
          8. Hidden Fields
        3. The <textarea> Tag
        4. The <select> Tag
        5. An Example Form
      6. 7. Character Entities
      7. 8. Color Names and Values
    4. II. CSS
      1. 9. Cascading Style Sheets
        1. The Elements of Styles
          1. Inline Styles
          2. Document-Level Styles
          3. External Style Sheets
            1. Linked external stylesheets
            2. Imported external style sheets
            3. Linked versus imported style sheets
          4. Limitations of Current Browsers
          5. Style Comments
        2. Style Syntax
          1. Multiple Selectors
          2. Contextual Selectors
          3. Style Classes
            1. Regular classes
            2. Generic classes
            3. Using IDs as classes
            4. Style pseudo-classes
            5. Class inheritance
        3. Style Properties
          1. Property Values
            1. Keyword property values
            2. Length property values
            3. Percentage property values
            4. URL property values
            5. Color property values
          2. Property Inheritance
        4. CSS Reference
          1. background
          2. background-attachment
          3. background-color
          4. background-image
          5. background-position
          6. background-repeat
          7. border
          8. border-bottom
          9. border-bottom-width
          10. border-color
          11. border-left
          12. border-left-width
          13. border-right
          14. border-right-width
          15. border-style
          16. border-top
          17. border-top-width
          18. border-width
          19. clear
          20. color
          21. display
          22. float
          23. font
          24. font-family
          25. font-size
          26. font-style
          27. font-variant
          28. font-weight
          29. height
          30. letter-spacing
          31. line-height
          32. list-style
          33. list-style-image
          34. list-style-position
          35. list-style-type
          36. margin
          37. margin-bottom
          38. margin-left
          39. margin-right
          40. margin-top
          41. padding
          42. padding-bottom
          43. padding-left
          44. padding-right
          45. padding-top
          46. text-align
          47. text-decoration
          48. text-indent
          49. text-transform
          50. vertical-align
          51. word-spacing
          52. white-space
          53. width
    5. III. XML
      1. 10. XML
        1. XML Terminology
          1. Unlearning Bad Habits
          2. An Overview of an XML Document
          3. A Simple XML Document
            1. Namespaces
          4. A Simple Document Type Definition (DTD)
          5. A Simple XSL Stylesheet
        2. XML Reference
          1. Well-Formed XML
          2. XML Instructions
            1. <?xml ... ?>
            2. <!DOCTYPE>
            3. <?...?>
            4. CDATA
            5. <!-- ... -->
          3. Element and Attribute Rules
          4. XML Reserved Attributes
            1. xml:lang
            2. xml:space
            3. xml:link
            4. xml:attribute
          5. Entity References
        3. Document Type Definitions
          1. Element Declarations
            1. ANY and PCDATA
            2. Multiple elements
            3. Grouping and recurrence
            4. Empty elements
          2. Entities
            1. General entities
            2. Parameter entities
            3. External entities
            4. Unparsed entities
            5. Notations
          3. Attribute Declarations in the DTD
            1. Default values
            2. Datatypes
          4. Included and Ignored Marked Sections
          5. Internal Subsets
        4. The Extensible Stylesheet Language
          1. Formatting objects
          2. General Formatting
          3. Pattern Matching
            1. Matching on ancestry
            2. Tests
            3. Other matchings
            4. Attribute value templates
            5. Numbering elements
            6. Template matching rules
            7. Linking in stylesheets
          4. XSL Elements
            1. <xsl:apply-imports>
            2. <xsl:apply-templates>
            3. <xsl:arg>
            4. <xsl:attribute>
            5. <xsl:attribute-set>
            6. <xsl:choose>
            7. <xsl:comment>
            8. <xsl:constant>
            9. <xsl:contents>
            10. <xsl:copy>
            11. <xsl:counter>
            12. <xsl:counters>
            13. <xsl:counter-increment>
            14. <xsl:counter-reset>
            15. <xsl:counter-scope>
            16. <xsl:element>
            17. <xsl:for-each>
            18. <xsl:id>
            19. <xsl:if>
            20. <xsl:import>
            21. <xsl:include>
            22. <xsl:macro>
            23. <xsl:macro-arg>
            24. <xsl:number>
            25. <xsl:otherwise>
            26. <xsl:pi>
            27. <xsl:preserve-space>
            28. <xsl:strip-space>
            29. <xsl:value-of>
            30. <xsl:template>
            31. <xsl:text>
            32. <xsl:use>
            33. <xsl:when>
        5. XLink and XPointer
          1. Unique Identifiers
          2. ID References
          3. XPointers
            1. ID references with XPointer
            2. Absolute location terms
            3. Relative location terms
            4. Arguments
            5. Terms
            6. Strings
            7. Spans
            8. Arcana
            9. Additional node types
            10. Locating attributes
            11. When XPointers fail
          4. XLink
            1. Attribute remapping
          5. Building Extended Links
            1. Inline multiended links
            2. Out-of-line links
    6. IV. JavaScript
      1. 11. JavaScript
        1. Versions of JavaScript
        2. JavaScript Reference
        3. JavaScript Syntax
        4. Variables
        5. Data Types
        6. Expressions and Operators
        7. Statements
        8. Regular Expressions
        9. JavaScript in HTML
        10. Client-Side Object Hierarchy
        11. Windows and Frames
        12. Forms
        13. Events
        14. JavaScript Security Restrictions
        15. Global Properties
        16. Global Functions
        17. Alphabetical Object Reference
          1. Anchor
          2. Applet
          3. Area
          4. Arguments
          5. Array
          6. Boolean
          7. Button
          8. Checkbox
          9. Crypto
          10. Date
          11. Document
          12. Event
          13. FileUpload
          14. Form
          15. Frame
          16. Function
          17. Hidden
          18. History
          19. HTMLElement
          20. Image
          21. Input
          22. JavaArray
          23. JavaClass
          24. JavaObject
          25. JavaPackage
          26. JSObject
          27. Layer
          28. Link
          29. Location
          30. Math
          31. MimeType
          32. Navigator
          33. Number
          34. Object
          35. Option
          36. Password
          37. Plugin
          38. PrivilegeManager
          39. Radio
          40. RegExp
          41. Reset
          42. Screen
          43. Select
          44. String
          45. Style
          46. Submit
          47. Text
          48. Textarea
          49. URL
          50. Window
    7. V. CGI and Perl
      1. 12. CGI Overview
        1. A Typical CGI Interaction
          1. Transferring the Form Data
          2. Creating Virtual Documents
        2. URL Encoding
        3. Extra Path Information
        4. CGI Environment Variables
      2. 13. Server Side Includes
        1. Configuring the Apache Server for SSI and XSSI
        2. Basic SSI Directives
          1. config
          2. echo
          3. exec
          4. flastmod
          5. fsize
          6. include
          7. printenv
          8. set
        3. SSI Environment Variables
        4. Configurable Time Formats for SSI Output
        5. Conditional Statements
      3. 14. The CGI.pm Module
        1. HTML Tag Generation
        2. Importing Method Groups
        3. Maintaining State
        4. Named Parameters
        5. Using JavaScript Features
        6. Debugging
        7. CGI.pm Reference
          1. accept
          2. append
          3. auth_type
          4. autoEscape
          5. button
          6. checkbox
          7. checkbox_group
          8. cookie
          9. defaults
          10. delete
          11. delete_all
          12. dump
          13. end_html
          14. filefield
          15. header
          16. hidden
          17. image_button
          18. import_names
          19. isindex
          20. keywords
          21. nph
          22. param
          23. password_field
          24. path_info
          25. path_translated
          26. popup_menu
          27. radio_group
          28. raw_cookie
          29. ReadParse
          30. redirect
          31. referer
          32. remote_host
          33. remote_user
          34. request_method
          35. reset
          36. save
          37. script_name
          38. scrolling_list
          39. self_url
          40. start_html
          41. startform
          42. start_multipart_form
          43. submit
          44. textarea
          45. textfield
          46. url
          47. use_named_parameters
          48. user_agent
          49. user_name
      4. 15. Web Server Programming with mod_perl
        1. Design of mod_perl
        2. Installing mod_perl
        3. mod_perl Handlers
        4. Running CGI Scripts with mod_perl
        5. Server Side Includes with mod_perl
        6. <Perl> Sections
        7. Apache:: Modules
    8. VI. PHP
      1. 16. PHP
        1. Configuration
        2. Embedding PHP in HTML
          1. Including Files
        3. Language Syntax
        4. Variables
          1. Dynamic Variables
        5. Data Types
          1. Integers
          2. Floating-Point Numbers
          3. Strings
          4. Arrays
          5. Objects
          6. Boolean Values
          7. Type Casting
        6. Expressions
        7. Operators
        8. Control Structures
          1. if
          2. switch
          3. while
          4. do/while
          5. for
        9. Functions
          1. Variable Scope
          2. Passing Arguments
          3. Static Variables
        10. Web-Related Variables
        11. Examples
          1. Showing the Browser and IP Address
          2. Intelligent Form Handling
          3. Web Database Integration
        12. Function Reference
        13. Array Functions
        14. Configuration and Logging Functions
          1. Syslog Functions
        15. Database Functions
          1. dBase Functions
          2. DBM Functions
          3. FilePro Functions
          4. Hyperwave Functions
          5. Informix Functions
          6. InterBase Functions
          7. mSQL Functions
          8. MySQL Functions
          9. ODBC Functions
          10. Oracle Functions
          11. PostgreSQL Functions
          12. Sybase Functions
        16. Date/Time Functions
        17. Directory Functions
        18. File Functions
          1. GZIP File Functions
        19. Graphics Functions
        20. HTTP Functions
          1. Apache-Specific Functions
        21. IMAP Functions
        22. LDAP Functions
        23. Math Functions
          1. BC Arbitrary Precision Math Functions
        24. PDF Functions
          1. PDF
          2. FDF
        25. String Functions
        26. Variable Manipulation Functions
        27. XML Functions
          1. XML Event Handlers
          2. Character Encoding
          3. Function Reference
        28. Miscellaneous Functions
          1. DNS/Networking Functions
          2. Program Execution Functions
          3. Random Number Functions
          4. Semaphore Functions
          5. Shared Memory Functions
          6. SNMP Functions
          7. Miscellaneous Functions
    9. VII. HTTP
      1. 17. HTTP
        1. Client Requests
          1. Methods
            1. The GET method
            2. The HEAD method
            3. The POST method
            4. Other methods
        2. Server Responses and Status Codes
          1. Informational
          2. Client Request Successful
          3. Redirection
          4. Client Request Incomplete
          5. Server Errors
        3. HTTP Headers
          1. General Headers
            1. Cache-Control
            2. Connection
            3. Date
            4. MIME-Version
            5. Pragma
            6. Transfer-Encoding
            7. Upgrade
            8. Via
          2. Client Request Headers
            1. Accept
            2. Accept-Charset
            3. Accept-Encoding
            4. Accept-Language
            5. Authorization
            6. Cookie
            7. From
            8. Host
            9. If-Modified-Since
            10. If-Match
            11. If-None-Match
            12. If-Range
            13. If-Unmodified-Since
            14. Max-Forwards
            15. Proxy-Authorization
            16. Range
            17. Referer
            18. User-Agent
          3. Server Response Headers
            1. Accept-Ranges
            2. Age
            3. Proxy-Authenticate
            4. Retry-After
            5. Server
            6. Set-Cookie
            7. Vary
            8. Warning
            9. WWW-Authenticate
          4. Entity Headers
            1. Allow
            2. Content-Encoding
            3. Content-Language
            4. Content-Length
            5. Content-Location
            6. Content-MD5
            7. Content-Range
            8. Content-Transfer-E...
            9. Content-Type
            10. ETag
            11. Expires
            12. Last-Modified
            13. Location
        4. Cookies
          1. The Set-Cookie Response Header
          2. The Cookie Request Header
        5. Media Types and Subtypes
    10. VIII. Server Configuration
      1. 18. Apache Configuration
        1. Understanding Apache
          1. Apache Basics
          2. Handling Requests
          3. Password and Group Files
          4. Virtual Hosting
          5. Log Files
        2. Basic Server Configuration: Core Directives
          1. AccessConfig
          2. AccessFileName
          3. AddModule
          4. AllowOverride
          5. AuthName
          6. AuthType
          7. BindAddress
          8. BS200AuthFile
          9. ClearModuleList
          10. ContentDigest
          11. CoreDumpDir...
          12. DefaultType
          13. <Directory>
          14. <DirectoryMatch>
          15. DocumentRoot
          16. ErrorDocument
          17. ErrorLog
          18. <Files>
          19. <FilesMatch>
          20. Group
          21. HostNameLookups
          22. IdentityCheck
          23. <IfDefine>
          24. <IfModule>
          25. Include
          26. KeepAlive
          27. KeepAliveT...
          28. <Limit>
          29. Listen
          30. ListenBacklog
          31. <Location>
          32. <LocationMatch>
          33. LockFile
          34. LogLevel
          35. MaxClients
          36. MaxKeepAlive...
          37. MaxRequests...
          38. MaxSpareServers
          39. MinSpareServers
          40. NameVirtualHost
          41. Options
          42. PidFile
          43. Port
          44. require
          45. ResourceConfig
          46. RLimitCPU
          47. RLimitMEM
          48. RLimitNPROC
          49. Satisfy
          50. ScoreBoardFile
          51. SendBufferSize
          52. ServerAdmin
          53. ServerAlias
          54. ServerName
          55. ServerPath
          56. ServerRoot
          57. ServerSignature
          58. ServerTokens
          59. ServerType
          60. StartServers
          61. ThreadsPerChild
          62. TimeOut
          63. UseCanonicalName
          64. User
          65. <VirtualHost>
      2. 19. Apache Modules
        1. mod_access
          1. allow
          2. allow
          3. deny
          4. deny
          5. order
        2. mod_actions
          1. Action
          2. Script
        3. mod_alias
          1. Alias
          2. AliasMatch
          3. Redirect
          4. RedirectMatch
          5. RedirectPermanent
          6. RedirectTemp
          7. ScriptAlias
          8. ScriptAliasMatch
        4. mod_auth
          1. AuthAuthoritative
          2. AuthGroupFile
          3. AuthUserFile
        5. mod_auth_anon
          1. Anonymous
          2. Anonymous_Au...
          3. Anonymous_Log...
          4. Anonymous_Must...
          5. Anonymous_No...
          6. Anonymous_Ver...
        6. mod_auth_db
          1. AuthDBAuthor...
          2. AuthDBGroupFile
          3. AuthDBUserFile
        7. mod_auth_dbm
          1. AuthDBMAuthoritative
          2. AuthDBMGroupFile
          3. AuthDBMUserFile
        8. mod_autoindex
          1. AddAlt
          2. AddAltByEncoding
          3. AddAltByType
          4. AddDescription
          5. AddIcon
          6. AddIconByEnco...
          7. AddIconByType
          8. DefaultIcon
          9. FancyIndexing
          10. HeaderName
          11. IndexIgnore
          12. IndexOptions
          13. ReadmeName
        9. mod_browser
        10. mod_cern_meta
          1. MetaDir
          2. MetaFiles
          3. MetaSuffix
        11. mod_cgi
          1. ScriptLog
          2. ScriptLogLength
          3. ScriptLogBuffer
        12. mod_cookies
        13. mod_digest
          1. AuthDigestFile
        14. mod_dir
          1. DirectoryIndex
        15. mod_dld
        16. mod_dll
        17. mod_env
          1. PassEnv
          2. SetEnv
          3. UnsetEnv
        18. mod_example
          1. Example
        19. mod_expires
          1. ExpiresActive
          2. ExpiresByType
          3. ExpiresDefault
        20. mod_headers
          1. Header
        21. mod_imap
          1. ImapBase
          2. ImapDefault
          3. ImapMenu
        22. mod_include
          1. XBitHack
        23. mod_info
          1. AddModuleInfo
        24. mod_isapi
        25. mod_log_agent
          1. AgentLog
        26. mod_log_common
        27. mod_log_config
          1. CookieLog
          2. CustomLog
          3. LogFormat
          4. TransferLog
        28. mod_log_referer
          1. RefererIgnore
          2. RefererLog
        29. mod_mime
          1. AddEncoding
          2. AddHandler
          3. AddLanguage
          4. AddType
          5. ForceType
          6. SetHandler
          7. TypesConfig
        30. mod_mime_magic
          1. MimeMagicFile
        31. mod_mmap_static
          1. MMapFile
        32. mod_negotiation
          1. CacheNegotiat...
          2. LanguagePriority
        33. mod_proxy
          1. CacheDefaultExpire
          2. CacheDirLength
          3. CacheDirLevels
          4. CacheForce...
          5. CacheGcInterval
          6. CacheLastMod...
          7. CacheMaxExpire
          8. CacheRoot
          9. CacheSize
          10. NoCache
          11. NoProxy
          12. ProxyBlock
          13. ProxyDomain
          14. ProxyPass
          15. ProxyPassReverse
          16. ProxyReceive...
          17. ProxyRemote
          18. ProxyRequests
        34. mod_rewrite
          1. RewriteBase
          2. RewriteCond
          3. RewriteEngine
          4. RewriteLock
          5. RewriteLog
          6. RewriteLogLevel
          7. RewriteMap
          8. RewriteOptions
          9. RewriteRule
        35. mod_setenvif
          1. BrowserMatch
          2. BrowserMatchNo...
          3. SetEnvIf
          4. SetEnvIfNoCase
        36. mod_so
          1. LoadFile
          2. LoadModule
        37. mod_speling
          1. CheckSpelling
        38. mod_status
          1. ExtendedStatus
        39. mod_userdir
          1. UserDir
        40. mod_unique_id
        41. mod_usertrack
          1. CookieExpires
          2. CookieTracking
      3. 20. Server Performance
        1. Turn Off Reverse DNS Lookups
        2. Use the Most Recent Version of Your Server
          1. inetd Spawned Servers
          2. Forking Servers
          3. Preforking Servers
          4. Threaded Servers
          5. Keepalive Servers
        3. Keep HTML Content and HTTP Logs on Different Disks
        4. Keep Content as Small as Possible
        5. Performance Tips for HTML Authors
          1. Make It Easy on the Server
          2. Make it easy on the network
          3. Make It Easy on the Browser
          4. Make It Easy on the User
        6. Graphics
          1. Weight Watching
          2. Consolidation
          3. Reuse
          4. Psychology
          5. Animation
          6. VRML
        7. Preprocess Queries and Cache the Results
        8. Use Servlets or Server APIs
          1. CGI Internals and Performance Problems
        9. Increase RAM and Bandwidth
          1. Memory for the Operating System
          2. Memory for httpd
          3. Memory for Content
          4. Memory for CGIs
        10. Look for Excessive TCP Retransmits
        11. Use the Same TCP MTU as Your ISP
        12. Use a Trailing Slash When Requesting a Directory
    11. Index
    12. Colophon

Product information

  • Title: Webmaster in a Nutshell, Second Edition
  • Author(s): Stephen Spainhour, Robert Eckstein
  • Release date: June 1999
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781565923256