Page Speed Optimization Libraries
1.9.32.1
|
#include "meta_tag_filter.h"
Public Member Functions | |
MetaTagFilter (RewriteDriver *rewrite_driver) | |
virtual void | StartDocumentImpl () |
virtual void | StartElementImpl (HtmlElement *element) |
virtual void | EndElementImpl (HtmlElement *element) |
virtual void | Flush () |
virtual const char * | Name () const |
![]() | |
CommonFilter (RewriteDriver *driver) | |
const GoogleUrl & | base_url () const |
Getters. More... | |
const GoogleUrl & | decoded_base_url () const |
RewriteDriver * | driver () const |
HtmlElement * | noscript_element () const |
void | InsertNodeAtBodyEnd (HtmlNode *data) |
virtual void | StartDocument () |
Note: Don't overload these methods, overload the implementers instead! | |
virtual void | StartElement (HtmlElement *element) |
virtual void | EndElement (HtmlElement *element) |
virtual void | Characters (HtmlCharactersNode *characters) |
ResourcePtr | CreateInputResource (StringPiece input_url, bool *is_authorized) |
ResourcePtr | CreateInputResourceOrInsertDebugComment (StringPiece input_url, HtmlElement *element) |
void | ResolveUrl (StringPiece input_url, GoogleUrl *out_url) |
bool | BaseUrlIsValid () const |
bool | DebugMode () const |
bool | CanAddPagespeedOnloadToImage (const HtmlElement &) |
virtual void | LogFilterModifiedContent () |
virtual RewriteDriver::InlineAuthorizationPolicy | AllowUnauthorizedDomain () const |
virtual bool | IntendedForInlining () const |
Static Public Member Functions | |
static void | InitStats (Statistics *stats) |
static bool | ExtractAndUpdateMetaTagDetails (HtmlElement *element, ResponseHeaders *response_headers) |
![]() | |
static bool | ExtractMetaTagDetails (const HtmlElement &element, const ResponseHeaders *headers, GoogleString *content, GoogleString *mime_type, GoogleString *charset) |
Additional Inherited Members | |
![]() | |
static const char | kCreateResourceFailedDebugMsg [] |
Debug message to be inserted when resource creation fails. | |
![]() | |
ServerContext * | server_context () const |
const RewriteOptions * | rewrite_options () |
virtual const char * | LoggingId () |
This class is the implementation of convert_meta_tags filter, which removes meta tags from the html and replaces them with a corresponding response header.
|
virtual |
Rewrite tags in the following form: <meta http-equiv="Content-Type" content="text/html"> into response headers. In theory we could delete the tag, but since it is somewhat "dangerous" to mutate the html (in case a script is looking for something), we leave the tag in there. As long as the tags and the headers match, there should not be a performance hit.
Implements net_instaweb::CommonFilter.
|
static |
Utility function to extract the mime type and/or charset from a meta tag and update the response_headers if they are not set already.
|
virtual |
Overload these implementer methods: Intentionally left abstract so that implementers don't forget to change the name from Blah to BlahImpl.
Implements net_instaweb::CommonFilter.