"Static" means unchanged or constant, while "dynamic" means changing or lively. Therefore, static Web pages contain the same prebuilt content each time the page is loaded, while the content of dynamic Web pages can be generated on-the-fly.
Standard HTML pages are static Web pages. They contain HTML code, which defines the structure and content of the Web page. Each time an HTML page is loaded, it looks the same. The only way the content of an HTML page will change is if the Web developer updates and publishes the file.
Other types of Web pages, such as PHP, ASP, and JSP pages are dynamic Web pages. These pages contain "server-side" code, which allows the server to generate unique content each time the page is loaded. For example, the server may display the current time and date on the Web page. It may also output a unique response based on a Web form the user filled out. Many dynamic pages use server-side code to access database information, which enables the page's content to be generated from information stored in the database. Websites that generate Web pages from database information are often called database-driven websites.
Basic Comparision | Static Web Page | Dynamic Web Page |
---|---|---|
Basic | Static web pages will remain same for the time until and unless someone changes it manually. | Dynamic web pages are behavioral and have the capacity to produce distinctive content for different visitors. |
Application and web languages used to create web pages | HTML, JavaScript, CSS, etc. | CGI, AJAX, ASP, ASP.NET, etc. |
Information change | Occurs rarely | Frequently |
Page loading time | Less comparatively | More |
Use of Database | Doesn't use databases | A database is used. |