| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Network.Wai.Middleware.Push.Referer
Description
Middleware for server push learning dependency based on Referer:.
- pushOnReferer :: MakePushPromise -> Middleware
- type MakePushPromise = URLPath -> URLPath -> FilePath -> IO (Maybe PushPromise)
- defaultMakePushPromise :: MakePushPromise
- type URLPath = ByteString
Documentation
pushOnReferer :: MakePushPromise -> Middleware Source #
The middleware to push files based on Referer:. Learning strategy is implemented in the first argument.
Cache of learning information is kept for 30 seconds and cleared completely. Max number of keys (e.g. index.html) is 20. Max number of values (e.g. style.css) for each key is 20. These numbers are hard-coded at this moment.
type MakePushPromise Source #
defaultMakePushPromise :: MakePushPromise Source #
Learn if the file to be pushed is CSS (.css) or JavaScript (.js) file AND the Referer: ends with "/" or ".html" or ".htm".
type URLPath = ByteString Source #
Type for URL path.