Documentation ¶
Overview ¶
Package httpserve contains constants and utility functions for serving HTTP content.
Index ¶
Constants ¶
View Source
const ( // MaxCacheControlAge is the maximum age in a cache-control // header supported by most browsers. Notably, IE9 will consider // as stale resources with a max-age greather than this value // (2^31). MaxCacheControlAge = int(^uint32(0) >> 1) )
Variables ¶
View Source
var ( // MaxExpires is the maximum safe HTTP Expires header value. // It represents the UNIX biggest timestamp representable with // 32 bits. MaxExpires = time.Unix(int64(MaxCacheControlAge), 0).UTC() )
Functions ¶
func NeverExpires ¶
func NeverExpires(w http.ResponseWriter)
NeverExpires sets the appropriate headers on the given http.ResponseWriter to make the response never expire (in practical terms, it really expires in 68 years).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.