Safe Haskell | None |
---|---|
Language | Haskell98 |
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. Learning information is kept for 30 seconds.
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.