Page Speed Optimization Libraries
1.9.32.2
|
#include "css_url_encoder.h"
Static Public Member Functions | |
static void | SetInliningImages (const RequestProperties &request_properties, ResourceContext *resource_context) |
Sets Inlining of image according to the user agent. | |
This class implements the encoding of css urls with optional additional dimension metadata. For the legacy encoding, it used to prepend characters indicating whether the user-agent allows for inlining or webp. We may need to employ distinct CSS files for these types of browsers. This information is conveyed in the ResourceContext. http://..path../W.cssfile... CSS file optimized for webp-capable browsers. http://..path../I.cssfile... CSS file optimzed for for non-webp browsers that inline. http://..path../A.cssfile... Archaic browser (ie6+7) does neither.
Note that a legacy CSS URL beginning with W., I., or A. will be misinterpreted and will not be fetchable since the Decode function will strip off the leading 2 characters.
Note that a lot of this is legacy encoding now, and that we just unconditionally use the "A." encoding and rely on content hash and metadata cache + user-agent sniffing to keep things consistent.