Types of Pages

I am often asked if it is true that a website is outdated if it is written using HTML (HyperText Markup Language).

This is kind of a tricky question and one that is answered cavalierly far too often. In fact, the browser programs that run on our computers can understand only HTML (or XHTML - eXtensible HyperText Markup Language - the current standard for HTML), JavaScript, and CSS -- without extensions or plug-ins.

Even dynamic pages,where content is created on the webserver, are sent to the browser containing only HTML, JavaScript, and CSS.

Static pages are the same everytime your browser loads them. Static pages may contain interactivity provided by JavaScript or CSS (Cascading Style Sheet), but the content passed from the web server is always the same. These kinds of pages usually have a file extension of htm, html, ... The information flow for static pages is:

  1. Your browser asks the web server for a page (ie. index.html)
  2. The web server pulls the page from the server's storage and sends it back, as is, to your browser.
  3. Your web browser processes the CSS and Javascript and displays the content on your screen.
  4. If you refresh the screen, the web server will do exactly the same thing all over again.

Dynamic Pages are created by programs running in an application environment on the webserver (Server-Side). The programs will typically look at information passed to the application environment by the browser through parameters, cookies, and session variables. Typical file extensions are .php (for PHP application environment), .asp (MS ASP application environment), .aspx(MS asp.net Application environment). When the webserver gets a request for a file with one of these extensions, it passes the information to the appropriate application environment. The application environment runs the program contained in the file, often accesing databases and/or other server-side files. When the application has completed it's processing, it sends a file that is now a combination of html, CSS, and JavaScript. The browser then processes it the same as it did the static page. The information flow for dynamic pages is:

  1. Your browser asks the web server for a page (ie. index.php).
  2. The server recognizes that the page is a dynamic one and passes the file to the appropriate application environment.
  3. The application environment runs the program accesses the approriate database and external files. It may read as well as write to these resources.
  4. The application environment creates a file containing html, CSS and Javascript and sends it back to the browser.
  5. Your web browser processes the CSS and Javascript and displays the content on your screen.
  6. If you refresh the screen, the content may be totally different each time you reload it.

Interactive Elements are created on pages using JavaScript or

 

 

Key Differences

  • Static pages, usually written using HTML, are the same everytime the browser loads them
  • Dyamic pages change, usually according to some information supplied by interaction with the user
  • Interactive pages change what is shown by the web browser using programs running in the browser and without the need to go back to the server
  • Often pages are a combination of all three