Advantages of SSI: Speed and Broad Compatibility

The advantages of using SSI over externally loaded files (like HTML, CSS, or JavaScript files) are speed (fewer HTTP requests ), broad compatibility, and reduced maintenance costs. Here's an example from

 <script language="JavaScript1.2" type="text/javascript">  <!--#include virtual="newsflipper.js" --> </script> </body> 

This SSI embeds our DHTML newsflipper just before the end of our front page. This avoids an extra HTTP request and lets the content load first.

We use SSI throughout for things like navigation bars, dynamic footers, copyrights, and news tickers.'s home page is pre- assembled from numerous includes created by cron jobs. This keeps the front page content fresh and delivers it fast (kind of like Domino's, but we don't take 30 minutes to load). Interior pages include dynamically generated headers and footers. Even with 10 million impressions per month, we have received no complaints about page display speed.

Disadvantages of SSI

The downsides to SSI are increased overhead, security issues, limited environment variables , and limited programmability. Parsing files and inserting content does put a load on the server, although only heavily loaded sites will experience any noticeable slowdown . Enabling the exec option can pose a security risk. SSI can interfere with the caching of your documents. For browser sniffing, only the HTTP_USER_AGENT environment variable is set by default. However, there are ways to work around these limitations.


Speed Up Your Site[c] Web Site Optimization
Speed Up Your Site[c] Web Site Optimization
ISBN: 596515081
Year: 2005
Pages: 135 © 2008-2017.
If you may any questions please contact us: