The Wayback Machine - https://web.archive.org/web/20240709171210/https://www.geeksforgeeks.org/static-vs-dynamic-website/
Open In App

Static vs Dynamic Website

Last Updated : 19 Sep, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

What is Website? 
Website is the collection of web pages, different multimedia content such as text, images, and videos which can be accessed by the URL which you can see in the address bar of the browser. For example: https://www.geeksforgeeks.org 

How to access Websites? 
When we type a certain URL in a browser search bar, the browser requests the page from the Web server and the Web server returns the required web page and its content to the browser. Now, it differs how the server returns the information required in the case of static and dynamic websites. 

Types of Website: 

  • Static Website
  • Dynamic Website

Static Website: In Static Websites, Web pages are returned by the server which are prebuilt source code files built using simple languages such as HTML, CSS, or JavaScript. There is no processing of content on the server (according to the user) in Static Websites. Web pages are returned by the server with no change therefore, static Websites are fast. There is no interaction with databases. Also, they are less costly as the host does not need to support server-side processing with different languages. 

Architecture of Static Website

Architecture of Static Website

Note: Static does not mean that it will not respond to user actions, These Websites are called static because these cannot be manipulated on the server or interact with databases (which is the case in Dynamic Websites). 

Dynamic Website: In Dynamic Websites, Web pages are returned by the server which are processed during runtime means they are not prebuilt web pages but they are built during runtime according to the user’s demand with the help of server-side scripting languages such as PHP, Node.js, ASP.NET and many more supported by the server. So, they are slower than static websites but updates and interaction with databases are possible. 

Dynamic Websites are used over Static Websites as updates can be done very easily as compared to static websites (Where altering in every page is required) but in Dynamic Websites, it is possible to do a common change once and it will reflect in all the web pages. 
 

Architecture of Static Website

Architecture of Dynamic Website

Difference Between Static and Dynamic Websites:  

Static Website

Dynamic Website

Content of Web pages can not be change at runtime. Content of Web pages can be changed.
No interaction with database possible. Interaction with database is possible
It is faster to load as compared to dynamic website. It is slower than static website.
Cheaper Development costs. More Development costs.
No feature of Content Management. Feature of Content Management System.
HTML, CSS, Javascript is used for developing the website. Server side languages such as PHP, Node.js are used.
Same content is delivered everytime the page is loaded. Content may change everytime the page is loaded.

 



Similar Reads

How to Deploy a Basic Static HTML Website to Heroku?
Heroku is a simple and one-stop solution to host any website or server. This article revolves around how you can host your own Static HTML webpage on Heroku. To demonstrate this we are going to build a simple webpage and host it. PrerequisitesGitHeroku AccountHeroku CLI Let's create a directory named "portfolio" for our project. We will connect thi
3 min read
Hosting A Static Website On Firebase For Free
Building a web application is always a time-consuming job, especially for the beginner developers who have just landed their feet in the vast world of programming. And one of the most exciting parts is when the application is available for all to see. Being a new bee in programming most beginners lack the knowledge of hosting, servers, and how to p
5 min read
Password Protect a Static Website
Static websites are on rising again, In the early days of Internet HTML, CSS with some JavaScript is all the website, since then a number of Backend Frameworks like Django, Larvel, Ruby on Rails have been developed along with looks like WordPress which now powers one-third of websites have been also gained popularity. Website Builders are also expl
6 min read
How to Add a Favicon to a Next.js Static Website?
A favicon is a small icon that appears in the browser tab next to the page title. It helps users identify your website easily. In this article, we'll explore different approaches to adding a favicon to a Next.js static site. Table of Content What is a favicon?Getting a FaviconImport Head componentAdding a favicon.ico File to the Public DirectoryCon
3 min read
How to Publish a Static Website on GitHub?
Publishing a static website on GitHub is a great way to share your work with the world. GitHub Pages is a service offered by GitHub that allows you to host your static websites directly from a GitHub repository. In this article, we’ll walk you through the steps to publish your static website on GitHub. Hosting a website enables many web users to ac
6 min read
Difference between Responsive Website and Mobile Website
Responsive Website: Responsive websites are websites that are designed to fit all types of devices and adjust website layout to best fit screen size. There is no need to make any other device version of the website to fit small devices. Mobile Website: Mobile websites are websites that are designed to fit especially small devices screen such as mob
3 min read
How to Type Dynamic Object with Methods with Dynamic Argument Count ?
We are going to learn about how to type dynamic objects with methods with dynamic argument count. Type dynamic object with methods with dynamic argument count means defining an object in a programming language such as TypeScript or Python, where the methods of the object can accept varying numbers of arguments dynamically at runtime, providing flex
2 min read
New self vs. new static in PHP
New self: The self is keyword in PHP. It refers to the same class in which the new keyword is actually written. It refers to the class members, but not for any particular object. This is because the static members(variables or functions) are class members shared by all the objects of the class. The function called self::theFunction() behaves like "
4 min read
Next.js Automatic Static Optimization
In this article, we will learn about Automatic static optimization in NextJS. NextJS is a React-based framework. It has the power to Develop beautiful Web applications for different platforms like Windows, Linux, and mac. The linking of dynamic paths helps in rendering your NextJS components conditionally. Automatic Static Optimization is a feature
2 min read
Static Function in PHP
In certain cases, it is very handy to access methods and properties in terms of a class rather than an object. This can be done with the help of static keyword. Any method declared as static is accessible without the creation of an object. Static functions are associated with the class, not an instance of the class. They are permitted to access onl
3 min read
Article Tags :
three90RightbarBannerImg