Skip to content

Instantly share code, notes, and snippets.

@zarza
zarza / ajax-cache-include.js
Created Nov 17, 2018 — forked from jasondmoss/ajax-cache-include.js
jQuery: Load external scripts and cache them.
View ajax-cache-include.js
/**
* Cache AJAX-included scripts.
*/
$.cachedScript = function (url, options) {
options = $.extend(
options || {}, {
dataType: "script",
cache: true,
url: url
}