• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

13.1. How SSI Is Used

SSI allows you to create the framework for pages that will be dynamically generated by the server. For the web author, this can be a powerful tool for managing site production and increasing efficiency. The following are just a few examples of the ways SSI can be used:

  • Placing elements that you use over and over again. If you have an element that appears on every page of your site, such as a complex navigational header, you can place a single SSI command that just sources it in instead. If you make changes to the header, such as changing a URL or a graphic, you only need to make the change once, and it will be updated automatically on all pages of your site.

  • Place a constantly changing element on your page with a single line. For example, if you maintain a homepage that has a message that changes every day, use a Server Side Include command (and a script on the server) to replace the message automatically. You never need to touch the source code for the home page—you just let the server do the work.

  • Show the date and time the page was last updated.

  • Allow multiple users to submit content for inclusion on a web page without giving them access to the HTML source. For example, staff members could send in weekly updates via email. The server could run a script that turns the email into a text file, which is then inserted into the web page via an SSI command.

  • Serve an appropriate web page based on the browser making the request. You can even serve documents based on the user's domain name. (Note: not all servers can perform conditional functions. This is discussed later in this chapter.)


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint