This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
Canonical Google-Hosted JavaScript Libraries #532
Comments
You're right, we should have this. A first crack:
Running it:
The output of this should probably be a file we include in the release. |
Great! |
At first glance, this script doesn't seem to do the trick. I ran the script above and output the contents to hosted_js.conf. I included the file and enabled the directive.. but http://engineering.zippykid.com/ps.html did not seem to take the modifications.. the original html is <html>
<head>
<script src="jquery_1_10.js">
</script>
<script src="a.js">
</script>
<script src="b.js">
</script>
</head>
<body>
...
</body>
</html> But, a manual wget of and modification of the file https://modpagespeed.googlecode.com/svn/trunk/src/net/instaweb/genfiles/conf/pagespeed_libraries.conf seems to work. (currently the site mentioned above, is using the modified version) |
#!/bin/bash
curl https://modpagespeed.googlecode.com/svn/trunk/src/net/instaweb/genfiles/conf/pagespeed_libraries.conf \
| grep ModPagespeedLibrary \
| while read library size hash url ; do
echo " pagespeed Library $size $hash $url;"
done FYI, I looked into it a bit more, and here's the change (remove the "..).. |
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We need ngx_pagespeed to be at par with mod_pagespeed. A script that grabs https://code.google.com/p/modpagespeed/source/browse/trunk/src/net/instaweb/genfiles/conf/pagespeed_libraries.conf and converts it into an Nginx-specific include should be trivial. If you provide me some guidance on what language to use (Bash, Python, etc.) and how you want it to be called, I can do a PR.
https://developers.google.com/speed/pagespeed/module/filter-canonicalize-js
The text was updated successfully, but these errors were encountered: