Dynamic or Static Web Page

Of all the various ways you can make your site, your pages will more or less fall into one of two categories; dynamic or static. While the differences may seem obvious at first, the distinction becomes rather blurred at the edges when you try to categorize your work into one of the two types. Indeed, you might not feel the need to know the nature of the pages you are building, but more often than not your type of page could have an effect on the type of software that is best for the job.

So what's the difference?

Essentially, static pages are those on your site that send exactly the same response to every request; dynamic pages can customize the response on the server to offer personalization based on cookies and information it can get from the visitor.

An obvious example of a static page is an old style HTML document; the only way to change a HTML page is to upload a new or updated version in its place. Every time a static file is downloaded, the file contents that are sent to the browser are the same for everyone that accesses that file.

While most pages written in a particular scripting language will return a personalized response to each visitor, this is not always the case; the same is true for pages utilizing Server Side Includes. Suppose for a moment that you had two SHTML documents, both of which include a single file; the first including a simple HTML snippet for the menu, the second including an online poll script. The page including the menu would be static; the menu would be the same for everyone that downloaded it until either of the files were changed on the server. The page that included the poll however would be dynamic, as it would display different pages to people depending on their previous voting history.

Flash and Shockwave presentations are also classed as static content; despite the fact that user interaction can lead to different ways of presenting the same data, everyone will download the same file from the server.

Static Pages

Most of these advantages and disadvantages apply to normal HTML pages in particular.

Advantages
 
  • Quick and easy to put together, even by someone who doesn't have much experience.
  • Ideal for demonstrating how a site will look.
  • Cache friendly, one copy can be shown to many people.
  •  
  • Disadvantages
     

    Dynamic Pages

    Typically written in various scripting languages or technologies such as ASP, PHP, Perl or JSP.

    Advantages
     
    • Offers highly personalized and customized visitor options.
    • Database access improves the personalized experience (as opposed to using just client side cookies)
    • Scripts can read in data sources and display it differently depending on how it is run.
    • Can create the illusion of being updated regularly using time and date sensitive routines (or even randomisers) to display pre-written text.
  •  
  • Disadvantages