A website, or individual web page, can be static or dynamic. A static website contains information that does not change. It remains the same, or static, for every viewer of the site. A dynamic website contains information that changes, depending on the viewer, the time of the day, the time zone, the viewer's native language, and other factors. For example, the Computer Hope main page is a dynamic website that automatically changes daily.
A dynamic website can contain client-side scripting or server-side scripting to generate the changing content, or a combination of both scripting types. These sites also include HTML programming for the basic structure. The client-side or server-side scripting takes care of the guts of the site.
With server-side scripting, scripts are run on the server that hosts the page. The process for how the page is built is determined by parameters defined in the server-side scripting.
Dynamic websites contain Web pages that are generated in real-time. These pages include Web scripting code, such as PHP or ASP. When a dynamic page is accessed, the code within the page is parsed on the Web server and the resulting HTML is sent to the client's Web browser.
Most large websites are dynamic, since they are easier to maintain than static websites. This is because static pages each contain unique content, meaning they must be manually opened, edited, and published whenever a change is made. Dynamic pages, on the other hand, access information from a database. Therefore, to alter the content of a dynamic page, the webmaster may only need to update a database record. This is especially helpful for large sites that contain hundreds or thousands of pages. It also makes it possible for multiple users to update the content of a website without editing the layout of the pages.
Dynamic websites that access information from a database are also called database-driven websites.