IISWebspeed on static assets sub-domain?

33 views
Skip to first unread message

Saumin Patel

unread,
Oct 5, 2017, 6:09:41 PM10/5/17
to Support
Hi,
Can we use IISWebspeed only on a sub domain which serves static assets like CSS, JS, images, etc. To further explain, I have a CMS site which has dynamic content like text, images, css, etc. These resources are served from different domain. For example,

www.main.testcms.com - serves websites. The webpages have reference to below site for assets like <img src="www.assets.testcms.com/img/src.gif" />
www.assets.testcms.com - serves assets

Can i use IISWebspeed only on www.assets.testcms.com? If yes, how can i configure it?

Thanks!

Otto van der Schaaf

unread,
Oct 6, 2017, 4:36:05 AM10/6/17
to Saumin Patel, Support
You need to enable the module for the application pool that serves www.assets.testcms.com 
This should get you in-place resource optimization (enabled by default):

If the domains share the same configuration, you may want to use whitelisting or blacklisting of urls:

Otto

Saumin Patel

unread,
Oct 6, 2017, 9:18:58 AM10/6/17
to Support, saumin...@gmail.com
Great, thanks!
How can i verify that once i enable it works...Does ?PageSpeedFilters=+default work?

Saumin Patel

unread,
Oct 6, 2017, 9:37:07 AM10/6/17
to Support, saumin...@gmail.com
One more question: If there are 301 redirects from another location to www.assets.testcms.com, then does this module work in this use case? If yes, how can one verify?

Thanks!

Otto van der Schaaf

unread,
Oct 6, 2017, 9:43:51 AM10/6/17
to Saumin Patel, Support
Could you elaborate on how you perceive the module to interact with the 301 / what potential problems you see with its functioning here?
For verification, you could use command line tools like curl or wget. Or a modern browser and with embedded dev tools.

Otto

Saumin Patel

unread,
Oct 6, 2017, 9:56:00 AM10/6/17
to Support, saumin...@gmail.com
So, from original or the main site, www.testcms.com, some assets are rewritten to an internal url (www.testcms.com/assets/), and then i have a 301 redirect rule from (www.testcms.com/assets/) to www.assets.testcms.com/all. I plan to install this module under www.assets.testcms.com. So how do i verify that module is working in this case? I dont see a potential problem, i am just not sure how to validate. Because in view source of the page, the reference will still be www.testcms.com/assets/, so PageSpeedFilters=+debug will/may not work.
Please share your thoughts.

Thanks!

Otto van der Schaaf

unread,
Oct 6, 2017, 10:05:27 AM10/6/17
to Saumin Patel, Support
I see. From the module's perspective, the 301 is irrelevant: the browser will follow the redirect and request the url specified in the Location: header. This will work fine.
For validation, see my previous email. 

Having said that, from a page speed point of view, the 301's will be highly relevant. Eliminating these types of redirects is a recommendation from the PSI team.

We have a work-in-progress for an automated solution for eliminating unnecessary redirects over at https://github.com/pagespeed/mod_pagespeed/pull/1436, but that would only work if the module is enabled at the domain that serves html, which if I understand correctly is not the case here.

Otto

Saumin Patel

unread,
Oct 6, 2017, 10:14:12 AM10/6/17
to Support, saumin...@gmail.com
ok, thanks!
I am trying to load pagespeed_admin under www.assets.testcms.com, and i am getting page not found. Does that mean that the module is not working?>

Otto van der Schaaf

unread,
Oct 6, 2017, 10:46:41 AM10/6/17
to Saumin Patel, Support
The admin interface will only show for requests originating from localhost by default. Perhaps that's it?

Otto

Saumin Patel

unread,
Nov 6, 2017, 5:12:31 PM11/6/17
to Support, saumin...@gmail.com
I have verified that the module works on assets.testcms.com (stores only image files, css, js files). however, i am not seeing images being resized, or js being minified. Minification works only when i load an individual file (js, css) in the browser. How can i make image resizing work?

Otto van der Schaaf

unread,
Nov 6, 2017, 5:21:11 PM11/6/17
to Saumin Patel, Support
there's resize_images, and resize_rendered_image_dimensions, see https://www.modpagespeed.com/

Reply all
Reply to author
Forward
0 new messages