Canonicalize SPIP javascript prive/javascript/ajaxCallback.js using jsDelivr Github CDN and mod_pagespeed.
This will enable canonicalization for ajaxCallback.js (SPIP 3.1.x) using jsDelivr Github CDN - The parameter below will enable detection from this librarie size and checksum :
ModPagespeedEnableFilters canonicalize_javascript_libraries
Adding this :
ModPagespeedLibrary 21074 NvlVPCOPnd86d229dLuoo \
//cdn.jsdelivr.net/gh/spip/[email protected]/prive/javascript/ajaxCallback.min.js
will enable canonicalization for ajaxCallback.js, also based on file size 21074 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/spip/[email protected]/prive/javascript/ajaxCallback.min.js
minified : https://cdn.jsdelivr.net/gh/spip/[email protected]/prive/javascript/ajaxCallback.min.js
- When canonicalized, libraries will not be combined or minifyed by mod_pagespeed, but it can be done through jsdlivr. It's up to you to check what is the best.