Page Speed Optimization Libraries
1.2.24.1
|
#include "rewrite_options.h"
Classes | |
struct | BeaconUrl |
struct | ElementAttributeCategory |
Represents the content type of user-defined url-valued attributes. More... | |
struct | FilterEnumToIdAndNameEntry |
Maps a filter's enum (kAddHead) to its id ("ah") and name ("Add Head"). More... | |
class | FuriousSpec |
class | MutexedOptionInt64MergeWithMax |
struct | NameValue |
class | Option |
class | OptionBase |
class | OptionTemplateBase |
struct | PrioritizeVisibleContentFamily |
class | Properties |
class | Property |
class | PropertyBase |
class | PropertyLeaf |
struct | UrlCacheInvalidationEntry |
Public Types | |
enum | Filter { kAddBaseTag, kAddHead, kAddInstrumentation, kCanonicalizeJavascriptLibraries, kCollapseWhitespace, kCollectFlushEarlyContentFilter, kCombineCss, kCombineHeads, kCombineJavascript, kComputePanelJson, kComputeVisibleText, kConvertGifToPng, kConvertJpegToProgressive, kConvertJpegToWebp, kConvertMetaTags, kConvertPngToJpeg, kDebug, kDeferIframe, kDeferJavascript, kDelayImages, kDetectReflowWithDeferJavascript, kDeterministicJs, kDisableJavascript, kDivStructure, kElideAttributes, kExperimentSpdy, kExplicitCloseTags, kExtendCacheCss, kExtendCacheImages, kExtendCachePdfs, kExtendCacheScripts, kFallbackRewriteCssUrls, kFlattenCssImports, kFlushSubresources, kHandleNoscriptRedirect, kHtmlWriterFilter, kInlineCss, kInlineImages, kInlineImportToLink, kInlineJavascript, kInsertDnsPrefetch, kInsertGA, kInsertImageDimensions, kJpegSubsampling, kLazyloadImages, kLeftTrimUrls, kLocalStorageCache, kMakeGoogleAnalyticsAsync, kMoveCssAboveScripts, kMoveCssToHead, kOutlineCss, kOutlineJavascript, kPedantic, kPrioritizeVisibleContent, kProcessBlinkInBackground, kRecompressJpeg, kRecompressPng, kRecompressWebp, kRemoveComments, kRemoveQuotes, kResizeImages, kResizeMobileImages, kRewriteCss, kRewriteDomains, kRewriteJavascript, kRewriteStyleAttributes, kRewriteStyleAttributesWithUrl, kServeNonCacheableNonCritical, kSplitHtml, kSpriteImages, kSquashImagesForMobileScreen, kStripImageColorProfile, kStripImageMetaData, kStripNonCacheable, kStripScripts, kEndOfFilters } |
enum | OptionEnum { kAjaxRewritingEnabled, kAlwaysRewriteCss, kAnalyticsID, kAvoidRenamingIntrospectiveJavascript, kBeaconUrl, kBlinkDesktopUserAgent, kBlinkMaxHtmlSizeRewritable, kBlinkNonCacheablesForAllFamilies, kCacheInvalidationTimestamp, kClientDomainRewrite, kCombineAcrossPaths, kFinderPropertiesCacheExpirationTimeMs, kCriticalLineConfig, kCssFlattenMaxBytes, kCssImageInlineMaxBytes, kCssInlineMaxBytes, kCssOutlineMinBytes, kCssPreserveURLs, kDefaultCacheHtml, kDomainRewriteHyperlinks, kDomainShardCount, kEnableAggressiveRewritersForMobile, kEnableBlinkCriticalLine, kEnableBlinkDashboard, kEnabled, kEnableBlinkHtmlChangeDetection, kEnableBlinkHtmlChangeDetectionLogging, kEnableDeferJsExperimental, kEnableFlushSubresourcesExperimental, kEnableInlinePreviewImagesExperimental, kEnableLazyloadInBlink, kFlushBufferLimitBytes, kFlushHtml, kFlushMoreResourcesEarlyIfTimePermits, kForbidAllDisabledFilters, kFuriousCookieDurationMs, kFuriousSlot, kIdleFlushTimeMs, kImageInlineMaxBytes, kImageJpegNumProgressiveScans, kImageJpegRecompressionQuality, kImageLimitOptimizedPercent, kImageLimitResizeAreaPercent, kImageMaxRewritesAtOnce, kImagePreserveURLs, kImageRetainColorProfile, kImageRetainColorSampling, kImageRetainExifData, kImageRecompressionQuality, kCacheSmallImagesUnrewritten, kImageResolutionLimitBytes, kImageWebpRecompressionQuality, kImplicitCacheTtlMs, kIncreaseSpeedTracking, kInPlaceWaitForOptimized, kJsInlineMaxBytes, kJsOutlineMinBytes, kLazyloadImagesBlankUrl, kJsPreserveURLs, kLazyloadImagesAfterOnload, kInlineOnlyCriticalImages, kLogRewriteTiming, kLowercaseHtmlNames, kMaxCacheableResponseContentLength, kMaxCombinedJsBytes, kMaxHtmlCacheTimeMs, kMaxHtmlParseBytes, kMaxImageBytesForWebpInCss, kMaxImageSizeLowResolutionBytes, kMaxInlinedPreviewImagesIndex, kMaxUrlSegmentSize, kMaxUrlSize, kMinImageSizeLowResolutionBytes, kMinResourceCacheTimeToRewriteMs, kModifyCachingHeaders, kOverrideBlinkCacheTimeMs, kOverrideCachingTtlMs, kOverrideIeDocumentMode, kPassthroughBlinkForInvalidResponseCode, kProgressiveJpegMinBytes, kPropagateBlinkCacheDeletes, kRejectBlacklisted, kRejectBlacklistedStatusCode, kReportUnloadTime, kRespectVary, kRespectXForwardedProto, kRewriteDeadlineMs, kRewriteLevel, kRunningFurious, kServeStaleIfFetchError, kSupportNoScriptEnabled, kUseFixedUserAgentForBlinkCacheMisses, kUseSmartDiffInBlink, kXPsaBlockingRewrite, kXModPagespeedHeaderValue, kCacheFlushFilename, kCacheFlushPollIntervalSec, kCollectRefererStatistics, kExperimentalFetchFromModSpdy, kFetcherProxy, kFetcherTimeOutMs, kFileCacheCleanInodeLimit, kFileCacheCleanIntervalMs, kFileCacheCleanSizeKb, kFileCachePath, kHashRefererStatistics, kLruCacheByteLimit, kLruCacheKbPerProcess, kMemcachedServers, kMemcachedThreads, kMemcachedTimeoutUs, kMessageBufferSize, kRateLimitBackgroundFetches, kRefererStatisticsOutputLevel, kSlurpDirectory, kSlurpFlushLimit, kSlurpReadOnly, kStatisticsEnabled, kStatisticsLoggingEnabled, kStatisticsLoggingFile, kStatisticsLoggingIntervalMs, kStatisticsLoggingChartsCSS, kStatisticsLoggingChartsJS, kTestProxy, kUseSharedMemLocking, kEndOfOptions } |
enum | RewriteLevel { kPassThrough, kCoreFilters, kTestingCoreFilters, kAllFilters } |
enum | OptionSettingResult { kOptionOk, kOptionNameUnknown, kOptionValueInvalid } |
Used for return value of SetOptionFromName. | |
typedef std::set< Filter > | FilterSet |
Convenience name for a set of rewrite filters. | |
typedef std::pair< StringPiece, StringPiece > | OptionStringPair |
typedef std::set < OptionStringPair > | OptionSet |
typedef std::vector < PropertyBase * > | PropertyVector |
typedef std::vector< OptionBase * > | OptionBaseVector |
Convenience name for a set of rewrite options. | |
Public Member Functions | |
bool | ImageOptimizationEnabled () const |
void | InitializeOptions (const Properties *properties) |
bool | modified () const |
void | SetDefaultRewriteLevel (RewriteLevel level) |
void | SetRewriteLevel (RewriteLevel level) |
void | AddCustomFetchHeader (const StringPiece &name, const StringPiece &value) |
Specify a header to insert when fetching subresources. | |
const NameValue * | custom_fetch_header (int i) const |
int | num_custom_fetch_headers () const |
FuriousSpec * | GetFuriousSpec (int id) const |
bool | AvailableFuriousId (int id) |
virtual bool | AddFuriousSpec (const StringPiece &spec, MessageHandler *handler) |
virtual bool | SetFuriousState (int id) |
void | SetFuriousStateStr (const StringPiece &experiment_index) |
int | furious_id () const |
int | furious_spec_id (int i) const |
GoogleString | GetFuriousStateStr () const |
FuriousSpec * | furious_spec (int i) const |
int | num_furious_experiments () const |
void | AddUrlValuedAttribute (const StringPiece &element, const StringPiece &attribute, semantic_type::Category category) |
void | UrlValuedAttribute (int index, StringPiece *element, StringPiece *attribute, semantic_type::Category *category) const |
int | num_url_valued_attributes () const |
bool | RegisterLibrary (uint64 bytes, StringPiece md5_hash, StringPiece canonical_url) |
Store size, md5 hash and canonical url for library recognition. | |
const JavascriptLibraryIdentification * | javascript_library_identification () const |
RewriteLevel | level () const |
bool | AdjustFiltersByCommaSeparatedList (const StringPiece &filters, MessageHandler *handler) |
bool | EnableFiltersByCommaSeparatedList (const StringPiece &filters, MessageHandler *handler) |
bool | DisableFiltersByCommaSeparatedList (const StringPiece &filters, MessageHandler *handler) |
bool | ForbidFiltersByCommaSeparatedList (const StringPiece &filters, MessageHandler *handler) |
void | DisableAllFiltersNotExplicitlyEnabled () |
void | EnableFilter (Filter filter) |
void | ForceEnableFilter (Filter filter) |
void | DisableFilter (Filter filter) |
void | ForbidFilter (Filter filter) |
void | EnableFilters (const FilterSet &filter_set) |
void | DisableFilters (const FilterSet &filter_set) |
void | ForbidFilters (const FilterSet &filter_set) |
void | ClearFilters () |
void | EnableExtendCacheFilters () |
bool | Enabled (Filter filter) const |
bool | Forbidden (StringPiece filter_id) const |
void | GetEnabledFiltersRequiringScriptExecution (FilterSet *filter_set) const |
Returns the set of enabled filters that require JavaScript for execution. | |
void | DisableFiltersRequiringScriptExecution () |
Disables all filters that depend on executing custom javascript. | |
OptionSettingResult | SetOptionFromName (const StringPiece &name, const GoogleString &value, GoogleString *msg) |
bool | SetOptionsFromName (const OptionSet &option_set) |
bool | SetOptionFromNameAndLog (const StringPiece &name, const GoogleString &value, MessageHandler *handler) |
int64 | css_outline_min_bytes () const |
void | set_css_outline_min_bytes (int64 x) |
GoogleString | ga_id () const |
void | set_ga_id (GoogleString id) |
bool | increase_speed_tracking () const |
void | set_increase_speed_tracking (bool x) |
int64 | js_outline_min_bytes () const |
void | set_js_outline_min_bytes (int64 x) |
int64 | progressive_jpeg_min_bytes () const |
void | set_progressive_jpeg_min_bytes (int64 x) |
int64 | css_flatten_max_bytes () const |
void | set_css_flatten_max_bytes (int64 x) |
bool | cache_small_images_unrewritten () const |
void | set_cache_small_images_unrewritten (bool x) |
int64 | image_resolution_limit_bytes () const |
void | set_image_resolution_limit_bytes (int64 x) |
int64 | ImageInlineMaxBytes () const |
Retrieve the image inlining threshold, but return 0 if it's disabled. | |
void | set_image_inline_max_bytes (int64 x) |
int64 | CssImageInlineMaxBytes () const |
Retrieve the css image inlining threshold, but return 0 if it's disabled. | |
void | set_css_image_inline_max_bytes (int64 x) |
int64 | MaxImageInlineMaxBytes () const |
The larger of ImageInlineMaxBytes and CssImageInlineMaxBytes. | |
int64 | css_inline_max_bytes () const |
void | set_css_inline_max_bytes (int64 x) |
int64 | js_inline_max_bytes () const |
void | set_js_inline_max_bytes (int64 x) |
int64 | max_html_cache_time_ms () const |
void | set_max_html_cache_time_ms (int64 x) |
int64 | max_html_parse_bytes () const |
void | set_max_html_parse_bytes (int64 x) |
int64 | max_image_bytes_for_webp_in_css () const |
void | set_max_image_bytes_for_webp_in_css (int64 x) |
int64 | max_cacheable_response_content_length () const |
void | set_max_cacheable_response_content_length (int64 x) |
int64 | min_resource_cache_time_to_rewrite_ms () const |
void | set_min_resource_cache_time_to_rewrite_ms (int64 x) |
bool | need_to_store_experiment_data () const |
void | set_need_to_store_experiment_data (bool x) |
int64 | blocking_fetch_timeout_ms () const |
void | set_blocking_fetch_timeout_ms (int64 x) |
bool | override_ie_document_mode () const |
void | set_override_ie_document_mode (bool x) |
bool | IsUrlCacheValid (StringPiece url, int64 time_ms) const |
void | AddUrlCacheInvalidationEntry (StringPiece url_pattern, int64 timestamp_ms, bool is_strict) |
bool | IsUrlCacheInvalidationEntriesSorted () const |
void | set_cache_invalidation_timestamp_mutex (ThreadSystem::RWLock *lock) |
int64 | cache_invalidation_timestamp () const |
Cache invalidation timestamp is in milliseconds since 1970. | |
void | set_cache_invalidation_timestamp (int64 timestamp_ms) |
bool | UpdateCacheInvalidationTimestampMs (int64 timestamp_ms, const Hasher *hasher) |
int64 | idle_flush_time_ms () const |
void | set_idle_flush_time_ms (int64 x) |
int64 | flush_buffer_limit_bytes () const |
How much accumulated HTML will result in PSA introducing a flush. | |
void | set_flush_buffer_limit_bytes (int64 x) |
int | max_url_segment_size () const |
void | set_max_url_segment_size (int x) |
int | image_max_rewrites_at_once () const |
void | set_image_max_rewrites_at_once (int x) |
int | max_url_size () const |
The maximum size of the entire URL. If '0', this is left unlimited. | |
void | set_max_url_size (int x) |
int | rewrite_deadline_ms () const |
void | set_rewrite_deadline_ms (int x) |
int | domain_shard_count () const |
void | set_domain_shard_count (int64 x) |
void | set_enabled (bool x) |
bool | enabled () const |
void | set_ajax_rewriting_enabled (bool x) |
bool | ajax_rewriting_enabled () const |
void | set_in_place_wait_for_optimized (bool x) |
bool | in_place_wait_for_optimized () const |
void | set_combine_across_paths (bool x) |
bool | combine_across_paths () const |
void | set_log_rewrite_timing (bool x) |
bool | log_rewrite_timing () const |
void | set_lowercase_html_names (bool x) |
bool | lowercase_html_names () const |
void | set_always_rewrite_css (bool x) |
bool | always_rewrite_css () const |
void | set_respect_vary (bool x) |
bool | respect_vary () const |
void | set_respect_x_forwarded_proto (bool x) |
bool | respect_x_forwarded_proto () const |
void | set_flush_html (bool x) |
bool | flush_html () const |
void | set_serve_stale_if_fetch_error (bool x) |
bool | serve_stale_if_fetch_error () const |
void | set_enable_blink_critical_line (bool x) |
bool | enable_blink_critical_line () const |
void | set_default_cache_html (bool x) |
bool | default_cache_html () const |
void | set_modify_caching_headers (bool x) |
bool | modify_caching_headers () const |
void | set_inline_only_critical_images (bool x) |
bool | inline_only_critical_images () const |
void | set_lazyload_images_after_onload (bool x) |
bool | lazyload_images_after_onload () const |
void | set_lazyload_images_blank_url (const StringPiece &p) |
const GoogleString & | lazyload_images_blank_url () const |
void | set_max_inlined_preview_images_index (int x) |
int | max_inlined_preview_images_index () const |
void | set_min_image_size_low_resolution_bytes (int64 x) |
int64 | min_image_size_low_resolution_bytes () const |
void | set_max_image_size_low_resolution_bytes (int64 x) |
int64 | max_image_size_low_resolution_bytes () const |
void | set_furious_cookie_duration_ms (int64 x) |
int64 | furious_cookie_duration_ms () const |
void | set_finder_properties_cache_expiration_time_ms (int64 x) |
int64 | finder_properties_cache_expiration_time_ms () const |
bool | css_preserve_urls () const |
void | set_css_preserve_urls (bool x) |
bool | image_preserve_urls () const |
void | set_image_preserve_urls (bool x) |
bool | js_preserve_urls () const |
void | set_js_preserve_urls (bool x) |
bool | image_retain_color_profile () const |
void | set_image_retain_color_profile (bool x) |
bool | image_retain_color_sampling () const |
void | set_image_retain_color_sampling (bool x) |
bool | image_retain_exif_data () const |
void | set_image_retain_exif_data (bool x) |
void | set_metadata_cache_staleness_threshold_ms (int64 x) |
int64 | metadata_cache_staleness_threshold_ms () const |
void | set_metadata_input_errors_cache_ttl_ms (int64 x) |
int64 | metadata_input_errors_cache_ttl_ms () const |
const BeaconUrl & | beacon_url () const |
void | set_beacon_url (const GoogleString &beacon_url) |
virtual bool | trim_urls_in_css () const |
Return false in a subclass if you want to disallow all URL trimming in CSS. | |
int64 | image_jpeg_recompress_quality () const |
void | set_image_jpeg_recompress_quality (int64 x) |
int64 | image_recompress_quality () const |
void | set_image_recompress_quality (int64 x) |
int | image_limit_optimized_percent () const |
void | set_image_limit_optimized_percent (int x) |
int | image_limit_resize_area_percent () const |
void | set_image_limit_resize_area_percent (int x) |
int | image_jpeg_num_progressive_scans () const |
void | set_image_jpeg_num_progressive_scans (int x) |
int64 | image_webp_recompress_quality () const |
void | set_image_webp_recompress_quality (int64 x) |
bool | domain_rewrite_hyperlinks () const |
void | set_domain_rewrite_hyperlinks (bool x) |
bool | client_domain_rewrite () const |
void | set_client_domain_rewrite (bool x) |
void | set_flush_more_resources_early_if_time_permits (bool x) |
bool | flush_more_resources_early_if_time_permits () const |
void | set_flush_more_resources_in_ie_and_firefox (bool x) |
bool | flush_more_resources_in_ie_and_firefox () const |
void | set_enable_defer_js_experimental (bool x) |
bool | enable_defer_js_experimental () const |
void | set_enable_flush_subresources_experimental (bool x) |
bool | enable_flush_subresources_experimental () const |
void | set_enable_inline_preview_images_experimental (bool x) |
bool | enable_inline_preview_images_experimental () const |
void | set_enable_blink_debug_dashboard (bool x) |
bool | enable_blink_debug_dashboard () const |
void | set_enable_blink_html_change_detection (bool x) |
bool | enable_blink_html_change_detection () const |
void | set_enable_blink_html_change_detection_logging (bool x) |
bool | enable_blink_html_change_detection_logging () const |
void | set_use_smart_diff_in_blink (bool x) |
bool | use_smart_diff_in_blink () const |
void | set_propagate_blink_cache_deletes (bool x) |
bool | propagate_blink_cache_deletes () const |
void | set_enable_lazyload_in_blink (bool x) |
bool | enable_lazyload_in_blink () const |
void | set_blink_html_change_detection_time_ms (int64 x) |
int64 | blink_html_change_detection_time_ms () const |
void | set_override_blink_cache_time_ms (int64 x) |
int64 | override_blink_cache_time_ms () const |
void | set_blink_non_cacheables_for_all_families (const StringPiece &p) |
const GoogleString & | blink_non_cacheables_for_all_families () const |
const GoogleString & | blocking_rewrite_key () const |
void | set_blocking_rewrite_key (const StringPiece &p) |
bool | IsInBlinkCacheableFamily (const GoogleUrl &gurl) const |
int64 | GetBlinkCacheTimeFor (const GoogleUrl &gurl) const |
GoogleString | GetBlinkNonCacheableElementsFor (const GoogleUrl &gurl) const |
void | AddBlinkCacheableFamily (const StringPiece url_pattern, int64 cache_time_ms, const StringPiece non_cacheable_elements) |
Create and add a PrioritizeVisibleContentFamily object the given fields. | |
void | set_running_furious_experiment (bool x) |
bool | running_furious () const |
void | set_furious_ga_slot (int x) |
x should be between 1 and 5 inclusive. | |
int | furious_ga_slot () const |
void | set_report_unload_time (bool x) |
bool | report_unload_time () const |
void | set_implicit_cache_ttl_ms (int64 x) |
int64 | implicit_cache_ttl_ms () const |
void | set_x_header_value (const StringPiece &p) |
const GoogleString & | x_header_value () const |
void | set_avoid_renaming_introspective_javascript (bool x) |
bool | avoid_renaming_introspective_javascript () const |
void | set_use_fixed_user_agent_for_blink_cache_misses (bool x) |
bool | use_fixed_user_agent_for_blink_cache_misses () const |
void | set_blink_desktop_user_agent (const StringPiece &p) |
const GoogleString & | blink_desktop_user_agent () const |
void | set_passthrough_blink_for_last_invalid_response_code (bool x) |
bool | passthrough_blink_for_last_invalid_response_code () const |
int64 | blink_max_html_size_rewritable () const |
void | set_blink_max_html_size_rewritable (int64 x) |
void | set_apply_blink_if_no_families (bool x) |
bool | apply_blink_if_no_families () const |
void | set_critical_line_config (const StringPiece &p) |
const GoogleString & | critical_line_config () const |
void | set_forbid_all_disabled_filters (bool x) |
bool | forbid_all_disabled_filters () const |
bool | reject_blacklisted () const |
void | set_reject_blacklisted (bool x) |
HttpStatus::Code | reject_blacklisted_status_code () const |
void | set_reject_blacklisted_status_code (HttpStatus::Code x) |
bool | support_noscript_enabled () const |
void | set_support_noscript_enabled (bool x) |
void | set_max_combined_js_bytes (int64 x) |
int64 | max_combined_js_bytes () const |
void | set_pre_connect_url (const StringPiece &p) |
const GoogleString & | pre_connect_url () const |
void | set_property_cache_http_status_stability_threshold (int x) |
int | property_cache_http_status_stability_threshold () const |
void | set_enable_aggressive_rewriters_for_mobile (bool x) |
bool | enable_aggressive_rewriters_for_mobile () const |
virtual void | Merge (const RewriteOptions &src) |
void | Allow (const StringPiece &wildcard_pattern) |
void | Disallow (const StringPiece &wildcard_pattern) |
virtual void | DisallowTroublesomeResources () |
DomainLawyer * | domain_lawyer () |
const DomainLawyer * | domain_lawyer () const |
FileLoadPolicy * | file_load_policy () |
const FileLoadPolicy * | file_load_policy () const |
bool | IsAllowed (const StringPiece &url) const |
void | RetainComment (const StringPiece &comment) |
Adds a new comment wildcard pattern to be retained. | |
bool | IsRetainedComment (const StringPiece &comment) const |
void | set_override_caching_ttl_ms (int64 x) |
int64 | override_caching_ttl_ms () const |
void | AddOverrideCacheTtl (const StringPiece &wildcard) |
bool | IsCacheTtlOverridden (const StringPiece &url) const |
Is the cache TTL overridden for the given url? | |
void | AddRejectedUrlWildcard (const GoogleString &wildcard) |
void | AddRejectedHeaderWildcard (const StringPiece &header_name, const GoogleString &wildcard) |
bool | IsRejectedUrl (const GoogleString &url) const |
bool | IsRejectedRequest (const StringPiece &header_name, const StringPiece &value) const |
virtual RewriteOptions * | Clone () const |
void | ComputeSignature (const Hasher *hasher) |
void | ClearSignatureWithCaution () |
void | ClearSignatureForTesting () |
const GoogleString & | signature () const |
Returns the computed signature. | |
virtual GoogleString | OptionsToString () const |
virtual GoogleString | ToExperimentString () const |
virtual GoogleString | ToExperimentDebugString () const |
virtual const char * | class_name () const |
Name of the actual type of this instance as a poor man's RTTI. | |
virtual bool | NeedLowResImages () const |
Returns true if generation low res images is required. | |
const OptionBaseVector & | all_options () const |
Static Public Member Functions | |
static const char * | FilterName (Filter filter) |
static const char * | FilterId (Filter filter) |
static bool | AddByNameToFilterSet (const StringPiece &option, FilterSet *set, MessageHandler *handler) |
static bool | ParseRewriteLevel (const StringPiece &in, RewriteLevel *out) |
static bool | ParseBeaconUrl (const StringPiece &in, BeaconUrl *out) |
static bool | Initialize () |
static bool | Terminate () |
static bool | AddCommaSeparatedListToOptionSet (const StringPiece &options, OptionSet *set, MessageHandler *handler) |
static Filter | LookupFilterById (const StringPiece &filter_id) |
static const char * | LookupOptionEnum (OptionEnum option_enum) |
Returns the option name corresponding to the option enum. | |
static OptionEnum | LookupOption (const StringPiece &option_name) |
Static Public Attributes | |
static const int | kOptionsVersion = 13 |
static const char | kAjaxRewriteId [] |
static const char | kCssCombinerId [] |
static const char | kCssFilterId [] |
static const char | kCssImportFlattenerId [] |
static const char | kCssInlineId [] |
static const char | kCacheExtenderId [] |
static const char | kImageCombineId [] |
static const char | kImageCompressionId [] |
static const char | kJavascriptCombinerId [] |
static const char | kJavascriptInlineId [] |
static const char | kLocalStorageCacheId [] |
static const char | kJavascriptMinId [] |
static const char | kCollectFlushEarlyContentFilterId [] |
static const char | kPanelCommentPrefix [] |
static const Filter | kFirstFilter = kAddBaseTag |
Used for enumerating over all entries in the Filter enum. | |
static const int64 | kDefaultBlinkMaxHtmlSizeRewritable |
static const int64 | kDefaultCssFlattenMaxBytes |
static const int64 | kDefaultCssImageInlineMaxBytes |
static const int64 | kDefaultCssInlineMaxBytes |
static const int64 | kDefaultCssOutlineMinBytes |
static const int64 | kDefaultImageInlineMaxBytes |
static const int64 | kDefaultJsInlineMaxBytes |
static const int64 | kDefaultJsOutlineMinBytes |
static const int64 | kDefaultProgressiveJpegMinBytes |
static const int64 | kDefaultMaxCacheableResponseContentLength |
static const int64 | kDefaultMaxHtmlCacheTimeMs |
static const int64 | kDefaultMaxHtmlParseBytes |
static const int64 | kDefaultMaxImageBytesForWebpInCss |
static const int64 | kDefaultMetadataInputErrorsCacheTtlMs |
static const int64 | kDefaultMinResourceCacheTimeToRewriteMs |
static const int64 | kDefaultCacheInvalidationTimestamp |
static const int64 | kDefaultIdleFlushTimeMs |
static const int64 | kDefaultFlushBufferLimitBytes |
static const int64 | kDefaultImplicitCacheTtlMs |
static const int64 | kDefaultPrioritizeVisibleContentCacheTimeMs |
static const char | kDefaultBeaconUrl [] |
static const int64 | kDefaultImagesRecompressQuality |
static const int64 | kDefaultImageJpegRecompressQuality |
static const int | kDefaultImageLimitOptimizedPercent |
static const int | kDefaultImageLimitResizeAreaPercent |
static const int64 | kDefaultImageResolutionLimitBytes |
static const int | kDefaultImageJpegNumProgressiveScans |
static const int64 | kDefaultImageWebpRecompressQuality |
static const int | kDefaultDomainShardCount |
static const int64 | kDefaultBlinkHtmlChangeDetectionTimeMs |
static const int64 | kDefaultOverrideBlinkCacheTimeMs |
static const int | kDefaultMaxUrlSize |
static const int | kDefaultImageMaxRewritesAtOnce |
static const int | kDefaultMaxUrlSegmentSize |
static const int | kDefaultRewriteDeadlineMs |
Default time to wait for rewrite before returning original resource. | |
static const int | kDefaultMaxInlinedPreviewImagesIndex |
static const int64 | kDefaultMinImageSizeLowResolutionBytes |
static const int64 | kDefaultMaxImageSizeLowResolutionBytes |
static const int64 | kDefaultFinderPropertiesCacheExpirationTimeMs |
Default cache expiration value for finder properties in pcache. | |
static const int64 | kDefaultFuriousCookieDurationMs |
static const int64 | kDefaultMetadataCacheStalenessThresholdMs |
static const int64 | kDefaultMaxCombinedJsBytes |
Default maximum size of the combined js resource generated by JsCombiner. | |
static const int | kDefaultFuriousTrafficPercent |
static const int | kDefaultFuriousSlot |
Default Custom Variable slot in which to put Furious information. | |
static const char | kClassName [] |
static const char | kDefaultBlinkDesktopUserAgentValue [] |
static const char | kDefaultBlockingRewriteKey [] |
static const char | kRejectedRequestUrlKeyName [] |
static const int | kDefaultPropertyCacheHttpStatusStabilityThreshold |
Protected Member Functions | |
void | set_option_at (int index, OptionBase *option) |
template<class T > | |
void | set_option (const T &new_value, OptionTemplateBase< T > *option) |
void | Modify () |
Marks the config as modified. | |
void | set_default_x_header_value (const StringPiece &x_header_value) |
bool | SetupFuriousRewriters () |
virtual void | SetRequiredFuriousFilters () |
Enables filters needed by Furious regardless of experiment. | |
bool | InsertFuriousSpecInVector (FuriousSpec *spec) |
Static Protected Member Functions | |
template<class RewriteOptionsSubclass , class OptionClass > | |
static void | AddProperty (typename OptionClass::ValueType default_value, OptionClass RewriteOptionsSubclass::*offset, const char *id, OptionEnum option_enum, Properties *properties) |
Adds a new Property to 'properties' (the last argument). | |
static void | MergeSubclassProperties (Properties *properties) |
Protected Attributes | |
Option< BeaconUrl > | beacon_url_ |
Protected option values so that derived class can modify. | |
Option< GoogleString > | x_header_value_ |
The value we put for the X-Mod-Pagespeed header. Default is our version. |
Defines a set of customizations that can be applied to any Rewrite. There are multiple categories of customizations:
The options are themselves a complex system. Many Option objects are instantiated for each RewriteOptions instance. RewriteOptions can be constructed and destroyed multiple times per request so to reduce this cost, the static aspects of Options are factored out into Properties, which are intialized once per process via RewriteOptions::Initialize. Subclasses may also add new Properties and so property-list-merging takes place at Initialization time.
typedef std::pair<StringPiece, StringPiece> net_instaweb::RewriteOptions::OptionStringPair |
Convenience name for (name,value) pairs of options (typically filter parameters), as well as sets of those pairs.
If you add or remove anything from this list, you need to update the kFilterVectorStaticInitializer array in rewrite_options.cc and the LookupOptionEnumTest method in rewrite_options_test.cc.
static bool net_instaweb::RewriteOptions::AddByNameToFilterSet | ( | const StringPiece & | option, |
FilterSet * | set, | ||
MessageHandler * | handler | ||
) | [static] |
Lookup the given name to see if it's a filter name or one of the special names like "core" or "rewrite_images", and if so add the corresponding filter(s) to the given set. If the given name doesn't match -and- if handler is not NULL, logs a warning message to handler. Returns true if the name matched and the set was updated, false otherwise.
static bool net_instaweb::RewriteOptions::AddCommaSeparatedListToOptionSet | ( | const StringPiece & | options, |
OptionSet * | set, | ||
MessageHandler * | handler | ||
) | [static] |
Adds pairs of (option, value) to the option set. The option names and values are not checked for validity, just stored. If the string piece was parsed correctly, this returns true. If there were parsing errors this returns false. The set is still populated on error.
virtual bool net_instaweb::RewriteOptions::AddFuriousSpec | ( | const StringPiece & | spec, |
MessageHandler * | handler | ||
) | [virtual] |
Creates a FuriousSpec from spec and adds it to the configuration. Returns true if it was added successfully.
void net_instaweb::RewriteOptions::AddOverrideCacheTtl | ( | const StringPiece & | wildcard | ) | [inline] |
Overrides the cache ttl for all urls matching the wildcard with override_caching_ttl_ms().
void net_instaweb::RewriteOptions::AddUrlCacheInvalidationEntry | ( | StringPiece | url_pattern, |
int64 | timestamp_ms, | ||
bool | is_strict | ||
) |
If timestamp_ms greater than or equal to the last timestamp in url_cache_invalidation_entries_, then appends an UrlCacheInvalidationEntry with 'timestamp_ms' and 'url_pattern' to url_cache_invalidation_entries_. Else does nothing.
void net_instaweb::RewriteOptions::AddUrlValuedAttribute | ( | const StringPiece & | element, |
const StringPiece & | attribute, | ||
semantic_type::Category | category | ||
) |
Store that when we see <element attribute="X"> we should treat X as a URL pointing to a resource of the type indicated by category. For example, while by default we would treat the 'src' attribute of an a 'img' element as the URL for an image and will cache-extend, inline, or otherwise optimize it as appropriate, we would not do the same for the 'src' atrtribute of a 'span' element () because there's no "src" attribute of "span" in the HTML spec. If someone needed us to treat span.src as a URL, however, they could call: AddUrlValuedAttribute("src", "span", appropriate_category)
Makes copies of element and attribute.
bool net_instaweb::RewriteOptions::AdjustFiltersByCommaSeparatedList | ( | const StringPiece & | filters, |
MessageHandler * | handler | ||
) |
Enables filters specified without a prefix or with a prefix of '+' and disables filters specified with a prefix of '-'. Returns false if any of the filter names are invalid, but all the valid ones will be added anyway.
const OptionBaseVector& net_instaweb::RewriteOptions::all_options | ( | ) | const [inline] |
Return the list of all options. Used to initialize the configuration vector to the Apache configuration system.
void net_instaweb::RewriteOptions::Allow | ( | const StringPiece & | wildcard_pattern | ) | [inline] |
Registers a wildcard pattern for to be allowed, potentially overriding previous Disallow wildcards.
bool net_instaweb::RewriteOptions::AvailableFuriousId | ( | int | id | ) |
Returns false if id is negative, or if the id is reserved for NoExperiment or NotSet, or if we already have an experiment with that id.
Clear all explicitly enabled and disabled filters. Some filters may still be enabled by the rewrite level and HtmlWriterFilter will be enabled.
void net_instaweb::RewriteOptions::ClearSignatureForTesting | ( | ) | [inline] |
Clears a computed signature, unfreezing the options object. This is intended for testing.
void net_instaweb::RewriteOptions::ClearSignatureWithCaution | ( | ) | [inline] |
Clears the computed signature, unfreezing the options object. Warning: Please note that using this method is extremely risky and should be avoided as much as possible. If you are planning to use this, please discuss this with your team-mates and ensure that you clearly understand its implications. Also, please do repeat this warning at every place you use this method.
virtual RewriteOptions* net_instaweb::RewriteOptions::Clone | ( | ) | const [virtual] |
Make an identical copy of these options and return it. This does not* copy the signature, and the returned options are not in a frozen state.
Reimplemented in net_instaweb::ApacheConfig.
void net_instaweb::RewriteOptions::ComputeSignature | ( | const Hasher * | hasher | ) |
Computes a signature for the RewriteOptions object, including all contained classes (DomainLawyer, FileLoadPolicy, WildCardGroups).
Computing a signature "freezes" the class instance. Attempting to modify a RewriteOptions after freezing will DCHECK.
int64 net_instaweb::RewriteOptions::css_outline_min_bytes | ( | ) | const [inline] |
Explicitly disable all filters which are not *currently* explicitly enabled
Note: Do not call EnableFilter(...) for this options object after calling DisableAllFilters..., because the Disable list will not be auto-updated.
Used to deal with query param ?ModPagespeedFilter=foo Which implies that all filters not listed should be disabled.
bool net_instaweb::RewriteOptions::DisableFiltersByCommaSeparatedList | ( | const StringPiece & | filters, |
MessageHandler * | handler | ||
) |
Adds a set of filters to the disabled set. Returns false if any of the filter names are invalid, but all the valid ones will be added anyway.
void net_instaweb::RewriteOptions::Disallow | ( | const StringPiece & | wildcard_pattern | ) | [inline] |
Registers a wildcard pattern for to be disallowed, potentially overriding previous Allow wildcards.
virtual void net_instaweb::RewriteOptions::DisallowTroublesomeResources | ( | ) | [virtual] |
Blacklist of javascript files that don't like their names changed. This should be called for root options to set defaults.
Enables extend_cache_css, extend_cache_images, and extend_cache_scripts. Does not enable extend_cache_pdfs.
void net_instaweb::RewriteOptions::EnableFilter | ( | Filter | filter | ) |
Adds the filter to the list of enabled filters. However, if the filter is also present in either the list of disabled or forbidden filters, that takes precedence and it is not enabled.
bool net_instaweb::RewriteOptions::EnableFiltersByCommaSeparatedList | ( | const StringPiece & | filters, |
MessageHandler * | handler | ||
) |
Adds a set of filters to the enabled set. Returns false if any of the filter names are invalid, but all the valid ones will be added anyway.
static const char* net_instaweb::RewriteOptions::FilterId | ( | Filter | filter | ) | [static] |
Returns a two-letter id code for this filter, used for for encoding URLs.
static const char* net_instaweb::RewriteOptions::FilterName | ( | Filter | filter | ) | [static] |
Return the appropriate human-readable filter name for the given filter, e.g. "CombineCss".
bool net_instaweb::RewriteOptions::ForbidFiltersByCommaSeparatedList | ( | const StringPiece & | filters, |
MessageHandler * | handler | ||
) |
Adds a set of filters to the forbidden set. Returns false if any of the filter names are invalid, but all the valid ones will be added anyway.
void net_instaweb::RewriteOptions::ForceEnableFilter | ( | Filter | filter | ) |
Guarantees that a filter would be enabled even if it is present in the list of disabled filters by removing it from disabled & forbidden filter lists.
int64 net_instaweb::RewriteOptions::GetBlinkCacheTimeFor | ( | const GoogleUrl & | gurl | ) | const |
Get the cache time for gurl for prioritize_visible_content filter. In case gurl matches a url_pattern in prioritize_visible_content_families_ we return the corresponding cache_time_ms field, else we return kDefaultPrioritizeVisibleContentCacheTimeMs.
GoogleString net_instaweb::RewriteOptions::GetBlinkNonCacheableElementsFor | ( | const GoogleUrl & | gurl | ) | const |
Get elements to be treated as non-cacheable for gurl. In case gurl matches a url_pattern in prioritize_visible_content_families_ we return the corresponding non_cacheable_elements field, else we return empty string.
FuriousSpec* net_instaweb::RewriteOptions::GetFuriousSpec | ( | int | id | ) | const |
Returns the spec with the id_ that matches id. Returns NULL if no spec matches.
Returns a string representation of furious_id() suitable for consumption by SetFuriousStateStr(), encoding the index of the current experiment (not its id). If we're not running furious, returns the empty string.
int64 net_instaweb::RewriteOptions::idle_flush_time_ms | ( | ) | const [inline] |
How much inactivity of HTML input will result in PSA introducing a flush. Values <= 0 disable the feature.
bool net_instaweb::RewriteOptions::ImageOptimizationEnabled | ( | ) | const |
Checks if either of the optimizing rewrite options are ON and it includes kRecompressJPeg, kRecompressPng, kRecompressWebp, kConvertGifToPng, kConvertJpegToWebp and kConvertPngToJpeg.
static bool net_instaweb::RewriteOptions::Initialize | ( | ) | [static] |
Static initialization of members. Calls to Initialize and Terminate must be matched. Returns 'true' for the first Initialize call and the last Terminate call.
Reimplemented in net_instaweb::ApacheConfig.
void net_instaweb::RewriteOptions::InitializeOptions | ( | const Properties * | properties | ) |
Initializes the Options objects in a RewriteOptions instance based on the supplied Properties vector. Note that subclasses can statically define additional properties, in which case they should call this method from their constructor.
bool net_instaweb::RewriteOptions::InsertFuriousSpecInVector | ( | FuriousSpec * | spec | ) | [protected] |
Helper method to add pre-configured FuriousSpec objects to the internal vector of FuriousSpec's. Returns true if the experiment was added successfully. Takes ownership of (and may delete) spec.
bool net_instaweb::RewriteOptions::IsAllowed | ( | const StringPiece & | url | ) | const [inline] |
Determines, based on the sequence of Allow/Disallow calls above, whether a url is allowed.
bool net_instaweb::RewriteOptions::IsInBlinkCacheableFamily | ( | const GoogleUrl & | gurl | ) | const |
Does url match a cacheable family pattern? Returns true if url matches a url_pattern in prioritize_visible_content_families_.
bool net_instaweb::RewriteOptions::IsRetainedComment | ( | const StringPiece & | comment | ) | const [inline] |
If enabled, the 'remove_comments' filter will remove all HTML comments. As discussed in Issue 237, some comments have semantic value and must be retained.
Checks if url_cache_invalidation_entries_ is in increasing order of timestamp. For testing.
bool net_instaweb::RewriteOptions::IsUrlCacheValid | ( | StringPiece | url, |
int64 | time_ms | ||
) | const |
Returns false if there is an entry in url_cache_invalidation_entries_ with its timestamp_ms > time_ms and url matches the url_pattern. Else, return true.
const JavascriptLibraryIdentification* net_instaweb::RewriteOptions::javascript_library_identification | ( | ) | const [inline] |
Return the javascript_library_identification_ object that applies to the current configuration (NULL if identification is disabled).
static Filter net_instaweb::RewriteOptions::LookupFilterById | ( | const StringPiece & | filter_id | ) | [static] |
Convert an id string like "ah" to a Filter enum like kAddHead. Returns kEndOfFilters if the id isn't known.
int net_instaweb::RewriteOptions::max_url_segment_size | ( | ) | const [inline] |
The maximum length of a URL segment. for http://a/b/c.d, this is == strlen("c.d")
virtual void net_instaweb::RewriteOptions::Merge | ( | const RewriteOptions & | src | ) | [virtual] |
Merge src into 'this'. Generally, options that are explicitly set in src will override those explicitly set in 'this' (except that filters forbidden in 'this' cannot be enabled by 'src'), although option Merge implementations can be redefined by specific Option class implementations (e.g. OptionInt64MergeWithMax). One semantic subject to interpretation is when a core-filter is disabled in the first set and not in the second. My judgement is that the 'disable' from 'this' should override the core-set membership in the 'src', but not an 'enable' in the 'src'.
You can make an exact duplicate of RewriteOptions object 'src' via (new 'typeof src')->Merge(src), aka Clone().
Merge expects that 'src' and 'this' are the same type. If that's not true, this function will DCHECK.
static void net_instaweb::RewriteOptions::MergeSubclassProperties | ( | Properties * | properties | ) | [static, protected] |
Merges properties into all_properties so that RewriteOptions::Merge and SetOptionFromName can work across options from RewriteOptions and all relevant subclasses.
Each RewriteOptions subclass keeps its own property lists using its own private Properties* member variables. The private lists are used for initialization of default-values during construction. We cannot initialize subclass default option values during RewriteOptions construction because options with non-POD ValueType (e.g. GoogleString) have not yet been initialized, so we have to keep separate per-class property-lists for use during construction. However, we use a global sorted list for fast merging and setting-by-option-name.
static bool net_instaweb::RewriteOptions::ParseBeaconUrl | ( | const StringPiece & | in, |
BeaconUrl * | out | ||
) | [static] |
Parse a beacon url, or a pair of beacon urls (http https) separated by a space. If only an http url is given, the https url is derived from it by simply substituting the protocol.
void net_instaweb::RewriteOptions::set_cache_invalidation_timestamp | ( | int64 | timestamp_ms | ) | [inline] |
Sets the cache invalidation timestamp -- in milliseconds since 1970. This function is meant to be called on a RewriteOptions* immediately after instantiation. It cannot be used to mutate the value of one already in use in a RewriteDriver.
See also UpdateCacheInvalidationTimestampMs.
void net_instaweb::RewriteOptions::set_cache_invalidation_timestamp_mutex | ( | ThreadSystem::RWLock * | lock | ) | [inline] |
Supply optional mutex for setting a global cache invalidation timestamp. Ownership of 'lock' is transfered to this.
void net_instaweb::RewriteOptions::set_default_x_header_value | ( | const StringPiece & | x_header_value | ) | [inline, protected] |
Sets the global default value for 'x_header_value'. Note that setting this Option reaches through to the underlying property and sets the default value there, and in fact does *not affect the value of the instantiated RewriteOptions object.
void net_instaweb::RewriteOptions::set_domain_shard_count | ( | int64 | x | ) | [inline] |
The argument is int64 to allow it to be set from the http header or url query param and int64_query_params_ only allows setting of 64 bit values.
void net_instaweb::RewriteOptions::set_option | ( | const T & | new_value, |
OptionTemplateBase< T > * | option | ||
) | [inline, protected] |
When setting an option, however, we generally are doing so with a variable rather than a constant so it makes sense to pass it by reference.
void net_instaweb::RewriteOptions::set_option_at | ( | int | index, |
OptionBase * | option | ||
) | [inline, protected] |
Populates all_options_, based on the passed-in index, which should correspond to the property index calculated after sorting all_properties_. This enables us to sort the all_properties_ vector once, and use that to give us all_options_ that is sorted the same way.
void net_instaweb::RewriteOptions::SetDefaultRewriteLevel | ( | RewriteLevel | level | ) | [inline] |
Sets the default rewrite level for this RewriteOptions object only. Note that the defaults for other RewriteOptions objects are unaffected.
Do not set the modified bit -- we are only changing the default.
virtual bool net_instaweb::RewriteOptions::SetFuriousState | ( | int | id | ) | [virtual] |
Sets which side of the experiment these RewriteOptions are on. Cookie-setting must be done separately. furious::kFuriousNotSet indicates it hasn't been set. furious::kFuriousNoExperiment indicates this request shouldn't be in any experiment. Then sets the rewriters to match the experiment indicated by id. Returns true if succeeded in setting state.
void net_instaweb::RewriteOptions::SetFuriousStateStr | ( | const StringPiece & | experiment_index | ) |
We encode experiment information in urls as an experiment index: the first ExperimentSpec is a, the next is b, and so on. Empty string or an invalid letter means kFuriousNoExperiment.
OptionSettingResult net_instaweb::RewriteOptions::SetOptionFromName | ( | const StringPiece & | name, |
const GoogleString & | value, | ||
GoogleString * | msg | ||
) |
Set Option 'name' to 'value'. Returns whether it succeeded or the kind of failure (wrong name or value), and writes the diagnostic into 'msg'.
bool net_instaweb::RewriteOptions::SetOptionFromNameAndLog | ( | const StringPiece & | name, |
const GoogleString & | value, | ||
MessageHandler * | handler | ||
) |
Sets Option 'name' to 'value'. Returns whether it succeeded and logs any warnings to 'handler'.
bool net_instaweb::RewriteOptions::SetOptionsFromName | ( | const OptionSet & | option_set | ) |
Set all of the options to their values specified in the option set. Returns true if all options in the set were successful, false if not.
bool net_instaweb::RewriteOptions::SetupFuriousRewriters | ( | ) | [protected] |
Enable/disable filters and set options according to the current FuriousSpec that furious_id_ matches. Returns true if the state was set successfully.
const GoogleString& net_instaweb::RewriteOptions::signature | ( | ) | const [inline] |
Returns the computed signature.
We take a reader-lock because we may be looking at the global_options signature concurrent with updating it if someone flushes cache. Note that the default mutex implementation is NullRWLock, which isn't actually a mutex. Only (currently) for the Apache global_options() object do we create a real mutex. We don't expect contention here because we take a reader-lock and the only time we Write is if someone flushes the cache.
virtual GoogleString net_instaweb::RewriteOptions::ToExperimentDebugString | ( | ) | const [virtual] |
Returns a string with more information about the currently running furious experiment. Primarily used for tagging Google Analytics data. This format is not at all specific to Google Analytics, however.
virtual GoogleString net_instaweb::RewriteOptions::ToExperimentString | ( | ) | const [virtual] |
Returns a string identifying the currently running Furious experiment to be used in tagging Google Analytics data.
bool net_instaweb::RewriteOptions::UpdateCacheInvalidationTimestampMs | ( | int64 | timestamp_ms, |
const Hasher * | hasher | ||
) |
Updates the cache invalidation timestamp of a mutexed RewriteOptions instance. Currently this only occurs in Apache global_options, and is used for purging cache by touching a file in the cache directory.
This function ignores requests to move the invalidation timestamp backwards. It returns true if the timestamp was actually changed.
void net_instaweb::RewriteOptions::UrlValuedAttribute | ( | int | index, |
StringPiece * | element, | ||
StringPiece * | attribute, | ||
semantic_type::Category * | category | ||
) | const |
Look up a url-valued attribute, return details via element, attribute, and category. index must be less than num_url_valued_attributes().
const int64 net_instaweb::RewriteOptions::kDefaultFuriousCookieDurationMs [static] |
Default duration after which the furious experiment cookie will expire on the user's browser.
const int64 net_instaweb::RewriteOptions::kDefaultMaxImageSizeLowResolutionBytes [static] |
Default maximum image size below which low res image is generated by InlinePreviewImagesFilter.
const int net_instaweb::RewriteOptions::kDefaultMaxInlinedPreviewImagesIndex [static] |
Default number of first N images for which low res image is generated by DelayImagesFilter.
const int net_instaweb::RewriteOptions::kDefaultMaxUrlSegmentSize [static] |
See http://code.google.com/p/modpagespeed/issues/detail?id=9 Apache evidently limits each URL path segment (between /) to about 256 characters. This is not fundamental URL limitation but is Apache specific.
const int net_instaweb::RewriteOptions::kDefaultMaxUrlSize [static] |
IE limits URL size overall to about 2k characters. See http://support.microsoft.com/kb/208427/EN-US
const int64 net_instaweb::RewriteOptions::kDefaultMetadataCacheStalenessThresholdMs [static] |
Default time in milliseconds for which a metadata cache entry may be used after expiry.
const int64 net_instaweb::RewriteOptions::kDefaultMinImageSizeLowResolutionBytes [static] |
Default minimum image size above which low res image is generated by InlinePreviewImagesFilter.
const int net_instaweb::RewriteOptions::kOptionsVersion = 13 [static] |
This version index serves as global signature key. Much of the data emitted in signatures is based on the option ordering, which can change as we add new options. So every time there is a binary-incompatible change to the option ordering, we bump this version.
Note: we now use a two-letter code for identifying enabled filters, so there is no need bump the option version when changing the filter enum.
Updating this value will have the indirect effect of flushing the metadata cache.
This version number should be incremented if any default-values are changed, either in the add_option() call or via options->set_default.