Repaso
EspaƱol
Frontend & WebFoundationsFE-57

What is the difference between a static and a dynamic website?

Options

  1. Static sites have no images, while dynamic ones do
  2. Static serves fixed files; dynamic builds per request (Correct option)
  3. Static sites need a database; dynamic sites do not
  4. There is no real difference between the two kinds

Answer

A static site sends the same ready-made files to every visitor; a dynamic site builds each page on request, often with data from a database

Why

Static site: the server just finds a file (for example about.html) and sends it as it is. Everyone sees the same content.

Dynamic site: the server runs code, reads data (for example from a database), fills an HTML template and sends a page built for that request. A shop showing your orders is dynamic.

Static sites are simpler and cheaper. Dynamic sites are more flexible.

Remember

Static = same files for all. Dynamic = built per request.

Key terms

Practice this question in Repaso