Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces
defer_iframe_filter.h File Reference
#include "net/instaweb/rewriter/public/common_filter.h"
#include "net/instaweb/rewriter/public/rewrite_driver.h"
#include "pagespeed/kernel/base/basictypes.h"
#include "pagespeed/kernel/base/string.h"
#include "pagespeed/kernel/html/html_element.h"
#include "pagespeed/kernel/html/html_filter.h"

Go to the source code of this file.

Classes

class  net_instaweb::DeferIframeFilter
 

Namespaces

 net_instaweb
 Unit-test framework for wget fetcher.
 

Detailed Description

Contains the implementation of the DeferIframeFilter which defers the iframe using JsDeferDisabledJavascriptFilter. This filter should be called before JsDeferDisabledJavascriptFilter. This filter renames all the iframe tags to pagespeed_iframe and add a script which converts pagespeed_iframe back to iframe and the added script is deferred by JsDeferDisabledJavascriptFilter.

Html input to this filter looks like: <html> <head> </head> <body> <iframe src="1.html"></iframe> </body> </html>

Output for the above html will be: <html> <head> </head> <body> <script> defer_iframe script. </script> <pagespeed_iframe src="1.html"> <script> Script which changes above pagespeed_iframe tag name to iframe. </script> </pagespeed_iframe> </body> </html>

Above script which converts pagespeed_iframe to iframe will be deferred by JsDeferDisabledJavascriptFilter, hence loading of iframe is also deferred.