Javascript files won't get combined all the time

352 views
Skip to first unread message

Dániel Berkó

unread,
Oct 2, 2015, 10:54:39 AM10/2/15
to mod-pagespeed-discuss
I have a weird issue where on some page loads all of the .js files are combined my the page loads at around 0.4-0.5 sec. Other times only some of them get combined and the page loads in about 1 sec.

Here's two screenshots from http://tools.pingdom.com and my pagespeed.conf:

Jeff Kaufman

unread,
Oct 5, 2015, 10:46:04 AM10/5/15
to mod-pagespeed-discuss
Looking at the source of
http://magentotidehunter.co.uk?PageSpeedFilters=+debug I see:

<script pagespeed_orig_type="text/javascript"
src="http://magentotidehunter.co.uk/skin/frontend/rwd/default/js/lib/matchMedia.js"
type="text/psajs" orig_index=17></script><!--This script contains
introspective JavaScript and is unsafe to replace.--><!--JS not
inlined since it may be looking for its source-->

That is, PageSpeed isn't combining matchMedia.js with other JS because
it thinks matchMedia.js cares about having a particular URL. In this
case, it is incorrect, and the JS is just looking for its own element
in order to insert more JS to run asynchronously. To disable this
heuristic, add

ModPagespeedAvoidRenamingIntrospectiveJavascript off

to your config.
https://developers.google.com/speed/pagespeed/module/restricting_urls#aris

Because this JS file appears in between other JS files, this also
limits our ability to combine. Once
AvoidRenamingIntrospectiveJavascript is off, that should be a lot
better.
> --
> You received this message because you are subscribed to the Google Groups
> "mod-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mod-pagespeed-di...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mod-pagespeed-discuss/64731507-317d-4af9-9830-1ffa24866c3e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Dániel Berkó

unread,
Oct 6, 2015, 4:19:18 AM10/6/15
to mod-pagespeed-discuss
Hi,
Thank you for your continuous support. 
I've added "ModPagespeedAvoidRenamingIntrospectiveJavascript off" to the bottom of my config file, but I still seem to be getting this issue. This data is from GTMetrix:
https://docs.google.com/spreadsheets/d/1wotaQsGz0f4mp84SRaJm7PZeAUg-7FOwhMMSZQRTtQQ/edit?usp=sharing
The number of requests always goes back to 25, then over time they'll get combined into only 15. Strangely this can happen 5 minutes apart.

Dániel Berkó

unread,
Oct 6, 2015, 11:40:40 AM10/6/15
to mod-pagespeed-discuss
I checked with the debug filter and I'm getting an error saying that the deadline for xyz filter has been exceeded e.g.
<!--deadline_exceeded for filter CacheExtender-->

Dániel Berkó

unread,
Oct 6, 2015, 12:32:19 PM10/6/15
to mod-pagespeed-discuss
Also there are these two .har files showing the difference between the number of page requests.
GTmetrix-magentotidehunter.co.uk-20151006T171306-PSzA6vhY.har
GTmetrix-magentotidehunter.co.uk-20151006T171430-MJRoNoTb.har
Reply all
Reply to author
Forward
0 new messages