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

18.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 use 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 need to make the change only once, and it will be updated automatically on all pages of your site.

  • Placing a constantly changing element on your page with a single line. For example, if you maintain a home page that has a message that changes every day, you can 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, or show the current date and time in the user's time zone.

  • 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 that 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