If no Accept-Encoding header is set, or the browser is IE before v6 SP2,
this will return ('', ''), the "identity" encoding.
A syntax-aware scan is done of the Accept-Encoding, so the method must
be non 0. The methods are favored in order of gzip, deflate, then
compress. Deflate is always smallest and generally faster, but is
rarely sent by servers, so client support could be buggier.
public static getAcceptedEncoding ( boolean $allowCompress = true, boolean $allowDeflate = true ) : array | ||
$allowCompress | boolean | allow the older compress encoding |
$allowDeflate | boolean | allow the more recent deflate encoding |
return | array | two values, 1st is the actual encoding method, 2nd is the alias of that method to use in the Content-Encoding header (some browsers call gzip "x-gzip" etc.) |