Skip to content

opalesurfcasting/ajaxCallback.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

ajaxCallback.js - SPIP 3.1.x and above

Canonicalize SPIP javascript prive/javascript/ajaxCallback.js using jsDelivr Github CDN and mod_pagespeed.

In Apache pagespeed.conf:

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.

Find the size and checksum :

pagespeed_js_minify --print_size_and_hash library.js - Find the size and checksum

Direct urls :

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

Notes :

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published