Google JS is not cached properly

486 views
Skip to first unread message

Rudolf Ladyzhenskii

unread,
Jul 25, 2015, 9:28:47 PM7/25/15
to mod-pagespeed-discuss
Hi all,

Not sure if this is the right topic, but running PageSpeed insights on my site I get:
Leverage browser caching for the following cacheable resources:


I have "extend_cache" on.


Does anyone know how to fix?


Thanks,

Rudolf

P.S. (I am migrating to TagManager, this is why you see few JS file included instead of only TagManager one)


Jeff Kaufman

unread,
Jul 27, 2015, 7:03:13 AM7/27/15
to mod-pagespeed-discuss

Could you paste the snippets you're using to include these?

--
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/df574810-8276-46d3-a6d5-6ea016d5b0bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rudolf Ladyzhenskii

unread,
Jul 27, 2015, 8:41:17 AM7/27/15
to mod-pagespeed-discuss, jef...@google.com
Those are included as part of Google-provided code snippets.
Here is one:
<script type="text/javascript">var gts=gts||[];gts.push(["id","XXXX"]);gts.push(["badge_position","BOTTOM_RIGHT"]);gts.push(["locale","en_AU"]);(function(){var gts=document.createElement("script");gts.type="text/javascript";gts.async=true;gts.src="https://www.googlecommerce.com/trustedstores/api/js";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(gts,s);})();</script>

Scripts are copied from respective Google services without any modifications.

Rudolf

Jeff Kaufman

unread,
Jul 27, 2015, 9:00:43 AM7/27/15
to Rudolf Ladyzhenskii, mod-pagespeed-discuss
PageSpeed can't fix these because the relevant URLs are loaded by JS that loads JS that loads JS.  What I've done with these before, though, is file bugs internally to Google to get these fixed.  It takes longer than if PageSpeed could just fix it up, but it helps many more sites.

If you could give me the rest of the snippets (with anything removed that you don't want shared) I can reproduce them here and then file bugs.
Reply all
Reply to author
Forward
0 new messages