Page Speed Optimization Libraries  1.4.26.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Friends
net_instaweb::SuppressPreheadFilter Class Reference

#include "suppress_prehead_filter.h"

Inheritance diagram for net_instaweb::SuppressPreheadFilter:
net_instaweb::HtmlWriterFilter net_instaweb::HtmlFilter net_instaweb::SplitHtmlFilter

List of all members.

Public Member Functions

 SuppressPreheadFilter (RewriteDriver *driver)
virtual void StartDocument ()
virtual void StartElement (HtmlElement *element)
virtual void EndElement (HtmlElement *element)
virtual void EndDocument ()
 Note: EndDocument will be called imediately before the last Flush call.

Protected Member Functions

virtual void Clear ()
 Clear various variables for rewriting a new html file.

Friends

class SuppressPreheadFilterTest

Detailed Description

SuppressPreheadFilter extracts the html before the <head> (pre head) and stores it in property cache to be used by FlushEarlyFlow. If a request is flushed early then the pre head value stored by this filter is used for responding to the request. When a response is received by the origin server, then this filter suppresses the pre head so that it is not written to the output again.


Member Function Documentation

Starts a new document. Filters should clear their state in this function, as the same Filter instance may be used for multiple HTML documents.

Reimplemented from net_instaweb::HtmlWriterFilter.

Reimplemented in net_instaweb::SplitHtmlFilter.

virtual void net_instaweb::SuppressPreheadFilter::StartElement ( HtmlElement element) [virtual]

When an HTML element is encountered during parsing, each filter's StartElement method is called. The HtmlElement lives for the entire duration of the document.

Todo:
TODO(jmarantz): consider passing handles rather than pointers and reference-counting them instead to save memory on long documents.

Reimplemented from net_instaweb::HtmlWriterFilter.

Reimplemented in net_instaweb::SplitHtmlFilter.


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