Skip to main content

Appendix A. Notes on Using the Link Header with HTML4

The Link HTTP header provides similar functionality to HTML's <link> element but with different scope and processing model.

Key Differences

Scope

  • HTTP Link Header: Document-level, processed before content parsing
  • HTML <link>: Document-level, processed during HTML parsing

Processing Timing

  • HTTP headers available immediately
  • HTML links require parsing document head
  • Performance implications for critical resources

Relation Type Mapping

Most HTML link relations map directly to HTTP Link header:

`<!-- HTML -->`
`<link rel="stylesheet" href="style.css">`

`<!-- HTTP Equivalent -->`
Link: ``<style.css>``; rel="stylesheet"

Use Cases

Combined Usage

  • Use Link header for performance-critical resources
  • Use HTML <link> for document-specific relationships
  • Both can coexist in same resource
  1. Available before HTML parsing
  2. Can be used with non-HTML resources
  3. Proxy/cache can process without parsing content

Note: Consult HTML specification for complete <link> element semantics.