| |  | Dynamically Including Information in Files Summary of Steps | Steps in Detail | Improving Performance Name the file using a filetype that indicates server-side include (SSI) parsing. Place SSI commands in the file to indicate what information you want to include. - Name the file using a filetype that indicates SSI parsing.
To view a list of filetypes that have been defined to indicate SSI parsing, enter the following command from a VM userid: query filetype * ssi yes If you use a filetype that does not indicate SSI parsing, VM:Webgateway ignores the SSI commands. - Place SSI commands in the file to indicate what information you want to include.
Use SSI commands to include items such as the current date and time, last modified date of the file being served, and the contents of another file. VM:Webgateway includes the information into the file before sending it to the web browser. Place an SSI command in an HTML comment, for example: <!-- #command attribute1="value1" attribute2="value2" ... --> - command
- Name of the SSI command
- attribute
- Attribute of the SSI command
See specific SSI commands for syntax and examples of using each. VM:Webgateway takes longer to serve an SSI parsable file than a non-parsable file because it must search for and act on embedded SSI commands. To improve the performance: - Use an SSI parsable filetype only for files that contain SSI commands to prevent VM:Webgateway from parsing files that do not contain SSI commands.
- Place files that are included in HTML documents by several users in a common location in the server root domain or a user page. Use a location that does not require a URL with many directory levels. This minimizes the cost of URL resolution and access control evaluation.
- To serve parsable files rapidly, create compiled versions of parsable files.
The following example illustrates how to compile the parsable file, MAIN SHTML, into a non-parsable file, MAIN HTML: - Using a web browser, request that VM:Webgateway serve MAIN SHTML.
- With the file displayed on your web browser, use the web browser to save the file to your hard disk.
- Transfer the file back to the server and rename it to MAIN HTML. The SSI commands are resolved in MAIN HTML.
- Modify all DIRMAP files that contain FILE records resolving to MAIN SHTML to include a FILE record that resolves to MAIN HTML.
When VM:Webgateway serves MAIN HTML, it does not spend time parsing MAIN HTML.
|