defer_javascript

12 views
Skip to first unread message

puresys...@gmail.com

unread,
Nov 19, 2018, 7:37:38 AM11/19/18
to Support
Hi,

We wanted to be able to exclude some JS references from the defer_javascript filter as it currently breaks the page. I saw we can add something to the JS tag to exclude it but as the site is in a CMS we can't change the tags. Are we able to exclude using commands in the iiswebspeed.config file?

Regards
Dan

Otto van der Schaaf

unread,
Nov 19, 2018, 7:48:33 AM11/19/18
to puresys...@gmail.com, Support
Yes, for example you could use disallow, e.g.:
pagespeed Disallow "*/js_tinyMCE.js"


Otto

puresys...@gmail.com

unread,
Nov 20, 2018, 10:18:58 AM11/20/18
to Support
Thanks Otto, that's useful.

Are we able to exclude certain pages/urls in the site from the defer_javascript filter but not affect the other filters? defer_javascript works well on most pages but breaks a few of them which we'd like to exclude.

Thanks
Dan

Otto van der Schaaf

unread,
Nov 20, 2018, 10:56:45 AM11/20/18
to puresys...@gmail.com, Support
You could declare the pagespeed_no_defer attribute as required  on script tags that run into trouble. Also you could have the app emit  “PageSpeed: -defer_javascript” as a response header for templates/pages that don’t take the filter well.

Otto
Reply all
Reply to author
Forward
0 new messages