How Server-Side Includes Work
- In the diagram, an "include" command string is represented by xxx.
- The text that replaces it (from a file, an environment variable, or
the output of a program) is represented as yyy.
- yyy is what the user sees in the browser window.
- Before a web page is delivered to a browser,
the server examines (parses) the text of the page.
- The server replaces any "server-side include" commands.
- With MIME types, the webmaster can restrict server parsing
(i.e. server-side includes) to files with a specific extension,
usually .shtml.
Thus, the server would parse test.shtml but not test.html.
- Drawbacks:
- Load on server
- Command exec could be a security risk
- No standard for functionality or syntax