# X-Sendfile Support

Scripts and Web applications using CGI, FastCGI or ISAPI (as well as ASP.NET applications) can accelerate file service by emitting the special CGI header `X-Sendfile`. Such an acceleration is actually performed by delegating to the low-level parts of the Web server the service of the static file to the client.

For that header to be processed, the script or Web application must be in a script path declared with X-Sendfile Support enabled as outlined in the description of "Script Paths".

Example 6-2. A very simple script taking advanatge of X-Sendfile support (PHP version)

       <?php

       /* Output the special header */
       header("X-Sendfile: hello.txt")

       ?>

The virtual path of the above script should be added to Script Paths. The declared script path should have its X-Sendfile Support enabled and its Files Root Path set to the real directory from which the file `hello.txt` should be served.