Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

Serving static files

 

Function List


 

void ServeStaticPage(Http& http)

Skylark handler for serving static files placed on path given in configuration. Files will be served with mime-type based on the extension. Recognized extensions are jpg, png, gif, js and css. Files with unknown extensions are served as text. The Ini variable caching can be used to set behavior of the caching. Currently supported values are 0=no caching, 1=use ETag header (allows browser to check if the content was modified, without downloading the file), 2=use versioned path like /static/ver1345496224/favicon.png that allows to use very strong caching while ensuring that when the file is change it will be immediately updated on clients browser as well. Both ETag header value and the version string are the timestamp of the served file.

 


 

Value CachedStatic(Value filename)

A witz function intended as a helper to allow advanced caching of static files through the ServeStaticPage handler. It takes only one argument, the file to be served.

 

 

Last edit by micio on 08/01/2013. Do you want to contribute?. T++