Skip to content

Instantly share code, notes, and snippets.

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