Header AD

How To PageSpeed URL Control

All HTML files served by your server and all resources (CSS, images, JavaScript) found in HTML files whose origin matches the HTML file, or whose origin is allowed via Domain, are rewritten. However, this will be restricted by exploitation wildcards, exploitation the directives:










Apache:
                   
              ModPagespeedAllow wildcard_spec              ModPagespeedDisallow wildcard_spec


Nginx:
                         
              pagespeed Allow wildcard_spec;
              pagespeed Disallow wildcard_spec;
 
 
 
These directives are evaluated in sequence for every resource, 
to see whether or not the resource should be think about for editing.
This can be best thought of with AN example.

#Excluding JavaScript files that cannot be rewritten

 Apache:

ModPagespeedDisallow "*/jquery-ui-1.8.2.custom.min.js"

ModPagespeedDisallow "*/js_tinyMCE.js"
 
 
Nginx: 


pagespeed Disallow "*/jquery-ui-1.8.2.custom.min.js";
pagespeed
Disallow "*/js_tinyMCE.js";
 
 
 

#Specifying explicitly which types of files can be rewritten

 Every resource referenced by HTML from authorized domains is rewritten, as if there was an implicit.

Apache:
ModPagespeedAllow "*"
Nginx:
pagespeed Allow "*";
at the beginning of every configuration. To change the default to be exclusive, issue :

Apache:
ModPagespeedDisallow "*"
Nginx:
pagespeed Disallow "*";
and then follow it with which files you want to include.

 

Apache:
ModPagespeedDisallow "*"
ModPagespeedAllow "http://*example.com/*.html"
ModPagespeedAllow "http://*example.com/*/images/*.png"
ModPagespeedAllow "http://*example.com/*/styles/*.css"
ModPagespeedDisallow "*/images/captcha/*"
 
 
Nginx:
pagespeed Disallow "*";
pagespeed Allow "http://*example.com/*.html";
pagespeed Allow "http://*example.com/*/images/*.png";
pagespeed Allow "http://*example.com/*/styles/*.css";
pagespeed Disallow "*/images/captcha/*";
 
 
 JavaScript files are sensitive to their own names as they traverse the DOM.
 so any editing on these files is invalid. we have a tendency to cannot cache-extend them . once such files are identified, we are able to exclude from the editing method via: 

 

 
 
 
 
 

 

 
How To PageSpeed URL Control How To PageSpeed URL Control Reviewed by Unknown on 8:48 PM Rating: 5

No comments

Post AD