Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
net_instaweb::RequestProperties Class Reference

#include "request_properties.h"

Public Member Functions

 RequestProperties (UserAgentMatcher *matcher)
 
void SetUserAgent (StringPiece user_agent_string)
 Sets the user agent string on the underlying DeviceProperties object.
 
void ParseRequestHeaders (const RequestHeaders &request_headers)
 
bool SupportsImageInlining () const
 
bool SupportsLazyloadImages () const
 
bool SupportsCriticalCss () const
 
bool SupportsCriticalCssBeacon () const
 
bool SupportsCriticalImagesBeacon () const
 
bool SupportsJsDefer (bool enable_mobile) const
 
bool SupportsWebpInPlace () const
 
bool SupportsWebpRewrittenUrls () const
 
bool SupportsWebpLosslessAlpha () const
 
bool SupportsWebpAnimated () const
 
bool IsBot () const
 
UserAgentMatcher::DeviceType GetDeviceType () const
 
bool IsMobile () const
 
bool IsTablet () const
 
bool ForbidWebpInlining () const
 
bool AcceptsGzip () const
 
void LogDeviceInfo (AbstractLogRecord *log_record, bool enable_aggressive_rewriters_for_mobile)
 
bool RequestsSaveData () const
 
bool HasViaHeader () const
 

Friends

class ImageRewriteTest
 

Detailed Description

This class keeps track of the request properties of the client, which are for the most part learned from the UserAgent string and specific request headers that indicate what optimizations are supported; most properties are described in device_properties.h. It relies on DeviceProperties and DownstreamCachingDirectives objects for deciding on support for a given capability.

Member Function Documentation

void net_instaweb::RequestProperties::ParseRequestHeaders ( const RequestHeaders request_headers)

Calls ParseCapabilityListFromRequestHeaders on the underlying DownstreamCachingDirectives object.

bool net_instaweb::RequestProperties::SupportsWebpInPlace ( ) const

Note that it's assumed that if the proxy cache SupportsWebp it also supports the Accept: image/webp header (since this represents a strict subset of the user agents for which SupportsWebpRewrittenUrls holds).


The documentation for this class was generated from the following file: