Search
+1 (617) 7782998 | info@iispeed.com

IIS PageSpeed Configuration

Configuring IISpeed is done by editting text files named iispeed.config. There is a configuration file located in the install directory. This file defines the root configuration which is inherited into all websites that have the module enabled.

IISpeed will also check for a files named iispeed.config in the root of websites that have the iispeed module enabled for website-specific configuration. The website specific configuration will inherit the root settings. You can disable IISpeed for a website by renaming iispeed.config to something else.

PageSpeed Configuration and Tuning

Recommended reading for setting up PageSpeed optimization in detail

IISpeed configuration examples

Starting out from zero

A good approach to PageSpeed optimization is to start out with doing nothing and tune optimizations and options one by one.


    # Restrict per-request configuration
    pagespeed RequestOptionOverride example_token
    # Do not optimize anything at all, start out blank
    pagespeed RewriteLevel PassThrough
    pagespeed InPlaceResourceOptimization off
    # Iterate using https://www.iispeed.com/pagespeed/test and 
    # enable filters to fix any recommendations. For example:
    pagespeed EnableFilters prioritize_critical_css,rewrite_images

Example Website configuration

We'll illustrate IISpeed's more advanced configuration capabilities with an example.


    # enable iispeed on this webserver
    # changes in this file take effect immediately
    pagespeed on
    # Configuring a FileCachePath is mandatory for PageSpeed operation.
    # It must be readable and writeable by the user running the website's
    # application pool. When the setting does not exist or is invalid
    # no optimizations will be applied.
    pagespeed FileCachePath "c:\pagespeedcache"
 
    # enable some filters
    pagespeed EnableFilters trim_urls,sprite_images,defer_javascript
 
    # You can map urls to filesystem path, to allow loading
    # resources from disk instead of through http. Please note that this
    # will bypass some of IIS's security checks on urls, so only directories
    # that contain public files should be exposed like this
    pagespeed LoadFromFile http://foo.com/gfx/ c:\websites\foo.com\gfx\
    # we want to disable image rewriting in /foo/
    path:/foo/.*
    pagespeed DisableFilters rewrite_images
    # '!' means: stop matching
    # This makes sure that it won't be re-enabled elsewhere
    !
 
    # we want to completely reconfigure /foo2/
    path:/foo2/.*
    # clear will reset the configuration at this point
    clear
 
    # We would have to turn pagespeed on again, as it is disabled
    # by default inside the root configuration
    pagespeed on
 
    pagespeed EnableFilters trim_urls
    # we should only have trim_urls enabled at this point.
    



Share View Comments
.
Some content on this website represents a modified version of the official Google PageSpeed documentation