HOME

TheInfoList



OR:

A static web page, sometimes called a flat page or a stationary page, is a
web page A web page (or webpage) is a World Wide Web, Web document that is accessed in a web browser. A website typically consists of many web pages hyperlink, linked together under a common domain name. The term "web page" is therefore a metaphor of pap ...
that is delivered to a
web browser A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
exactly as stored, in contrast to dynamic web pages which are generated by a web application. Consequently, a static web page displays the same information for all users, from all contexts, subject to modern capabilities of a
web server A web server is computer software and underlying Computer hardware, hardware that accepts requests via Hypertext Transfer Protocol, HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, co ...
to negotiate content-type or language of the document where such versions are available and the server is configured to do so. However, a webpage's
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
can introduce dynamic functionality which may make the static web page dynamic.


Overview

Static web pages are often
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
documents, stored as files in the file system and made available by the web server over
HTTP HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
(nevertheless URLs ending with ".html" are not always static). However, loose interpretations of the term could include web pages stored in a
database In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
, 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.


Advantages

* Provide improved security over dynamic websites (dynamic websites are at risk to web shell attacks if a vulnerability is present) * Improved performance for end users compared to dynamic websites * Fewer or no dependencies on systems such as
database In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
s or other application servers * Cost savings from utilizing cloud storage, as opposed to a hosted environment * Security configurations are easy to set up, which makes it more secure


Disadvantages

* Dynamic functionality must be performed on the client side


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

* Jekyll (powers
GitHub GitHub () is a Proprietary software, proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug trackin ...
Pages) * Middleman * Hugo * Next.js * Astro.build * Pelican *Franklin


References


External links


The definitive listing of Static Site Generators
a community-curated list of static site generators. {{Web interfaces Web 1.0 Static website generators Web development