Page Speed Optimization Libraries
1.3.25.1
|
#include "suppress_prehead_filter.h"
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 |
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.
virtual void net_instaweb::SuppressPreheadFilter::StartDocument | ( | ) | [virtual] |
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.
Reimplemented from net_instaweb::HtmlWriterFilter.
Reimplemented in net_instaweb::SplitHtmlFilter.