Static web page

Web page delivered to web browser as-is From Wikipedia, the free encyclopedia

A static web page, sometimes called a flat page or a stationary page, is a web page that is delivered to a web browser exactly as stored,[1] in contrast to dynamic web pages which are generated by a web application.[2]

Consequently, a static web page displays the same information for all users, from all contexts, subject to modern capabilities of a web server to negotiate content-type or language of the document where such versions are available and the server is configured to do so.[3] However, a webpage's JavaScript can introduce dynamic functionality which may make the static web page dynamic.

Overview

Static web pages are often HTML documents,[4] stored as files in the file system and made available by the web server over HTTP (nevertheless URLs ending with ".html" are not always static). However, loose interpretations of the term could include web pages stored in a database, and could even include pages formatted using a template and served through an application server, as long as the page served is unchanging and presented essentially as stored.

The content of static web pages remains stationary irrespective of the number of times it is viewed. Such web pages are suitable for the contents that rarely need to be updated, though modern web template systems are changing this. Maintaining large numbers of static pages as files can be impractical without automated tools, such as static site generators. Any personalization or interactivity has to run client-side, which is restricting.[5]

Cloud-based website builders, including Wix, Weebly, and Duda, offer no-code platforms for creating static and dynamic web pages through graphical interfaces, without requiring programming expertise.[6][7]

Advantages

  • Provide improved security over dynamic websites (dynamic websites are at risk to web shell attacks if a vulnerability is present)[8]
  • Improved performance for end users compared to dynamic websites[9]
  • Fewer or no dependencies on systems such as databases or other application servers [10]
  • Cost savings from utilizing cloud storage, as opposed to a hosted environment[11]
  • Security configurations are easy to set up, which makes it more secure
  • Static files can be cached by content delivery networks (CDNs) and other intermediate caches, which both reduces page load times at the user and also reduces load on the origin server.[12][13][14][15][16]
  • Static websites can have improved uptime, since they are still available through any available CDN exit node even when other CDN nodes or the origin webserver are temporarily offline.[16][17][18]

Disadvantages

  • Dynamic functionality must be performed on the client side.[5]
  • After each update of a static website, some or all users may see old, stale, outdated previous versions instead of the latest version until the old version is flushed from CDNs and other caches.[16]

Static site generators

Static site generators are applications that compile static websites - typically populating HTML templates in a predefined folder and file structure, with content supplied in a format such as Markdown or AsciiDoc.

Implementations

References

Related Articles

Wikiwand AI