Web - Static Web Site

1 - About

A Static website is a web application that is composed of static resources. (ie the web site doesn't need to generate dynamic pages at runtime)

The first reason to create or generate a static website is to improve performance because the pages:

  • are easily cached
  • and don't need to be generated

3 - Management

3.1 - Resource

3.2 - Caching

CDN can cache and serve static resource.

Dynamic web site can:

3.3 - Serving

static content must be served from a cookieless domain in order to lower the network traffic. In other words, static components should be requested with cookie-free requests.

Why ? When the browser makes a request for a static resource (image,…), sending cookies with this request is not needed because the content is not dynamic. (Cookies will not be read)

Another benefit of hosting static components on a cookie-free domain is that some proxies might refuse to cache the components that are requested with cookies.

On a related note, if you wonder if you should use example.org or www.example.org for your home page, consider the cookie impact. Omitting www leaves you no choice but to write cookies to *.example.org, so for performance reasons it's best to use the www subdomain and write the cookies to that subdomain.

Static WebSite Hosting (Static Resource Hosting)

3.4 - Web Site Conversion

3.4.1 - Static to Dynamic

A static website can be turned into a dynamic web application by adding client-side JavaScript that makes AJAX calls to APIs.

3.4.2 - Dynamic to Static

A generator transforms a dynamic website to a static one.

A dynamic website can be turned into a static web application with a generator.

A generator will generate static resources (pages, image, …) from dynamic component (sort of template engine for instance, one page is generated by product)

Server Needed Method When will the static generation occurs
No Web - Prerendering / Snapshoting (Dynamic to Static Web Site Generation) build time
Yes Cache runtime

3.4.3 - Template to static

Generator from template create in a markup language such as markdown.

4 - Documentation / Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap