Andromeda
Note

Static Websites

Definition

A Static Website consists of pre-written, fixed HTML, CSS, and JavaScript files stored directly on a web server’s disk and served directly to the client browser without any real-time, server-side processing or database queries.

Why It Matters

Static websites maximize speed and minimize server costs and complexity. Because they do not require application code execution or database calls, they are incredibly fast to load, cheap to host, easy to cache on Content Delivery Networks (CDNs), and highly secure, as there is no database or backend code to hack. They are ideal for documentation, portfolio sites, and landing pages.

Core Concepts

  • Pre-rendered HTML: The HTML is identical for all users and changes only when the files on the server are manually updated or rebuilt by a static site generator (e.g., Jekyll, Hugo).
<!-- index.html (Static Content) -->
<!DOCTYPE html>
<html>
<body>
  <h1>My Static Portfolio</h1>
  <p>This content is pre-rendered and fast.</p>
</body>
</html>
  • CDN Edge Caching: Because static files do not change per user, they can be cached globally close to users, reducing latency and time-to-first-byte (TTFB).
  • Zero Database Dependency: Eliminates database latency and connection failures, making static sites highly reliable under heavy traffic spikes.

Connected Concepts