Page Speed Optimization Libraries  1.7.30.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
net_instaweb::MetaTagFilter Class Reference

#include "meta_tag_filter.h"

Inheritance diagram for net_instaweb::MetaTagFilter:
net_instaweb::CommonFilter

List of all members.

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

Static Public Member Functions

static void InitStats (Statistics *stats)
static bool ExtractAndUpdateMetaTagDetails (HtmlElement *element, ResponseHeaders *response_headers)

Detailed Description

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.


Member Function Documentation

virtual void net_instaweb::MetaTagFilter::EndElementImpl ( HtmlElement *  element) [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 bool net_instaweb::MetaTagFilter::ExtractAndUpdateMetaTagDetails ( HtmlElement *  element,
ResponseHeaders *  response_headers 
) [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.

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines