Canonicalize SPIP javascript prive/javascript/jquery.autosave.js using jsDelivr Github CDN and mod_pagespeed.
This will enable canonicalization for jquery.js (1.12.4 in SPIP 3.1.x) using googleapi CDN - The parameter below will enable detection from this librarie size and checksum - canonicalized libraries list :
ModPagespeedEnableFilters canonicalize_javascript_libraries
Adding this :
ModPagespeedLibrary 741 Ppl_Ry-HtT_ZvQ-n3zm_Q \
//cdn.jsdelivr.net/gh/opalesurfcasting/jquery.autosave@v1.0/jquery.autosave.min.js
will enable canonicalization for jquery.autosave.js, also based on file size 741 and checksum. This is needed as this file is not in default mod_pagespeed canonicalized libraries list.
pagespeed_js_minify --print_size_and_hash library.js
- Find the size and checksum
raw : https://cdn.jsdelivr.net/gh/opalesurfcasting/jquery.autosave@v1.0/jquery.autosave.js
minified : https://cdn.jsdelivr.net/gh/opalesurfcasting/jquery.autosave@v1.0/jquery.autosave.min.js
- Canonicalized libraries will not be combined or minifyed. It's up to you to check what is the best.