Closed BicanMarianValeriu closed 5 years ago
@BicanMarianValeriu Did you mean to create a github issue? With regards to caching, will the browser cache suffice for your use case?
I was trying to make a feature request. I'm thinking that is more useful to have that method and also, eg, if script is already loaded by something else (and or plugin), do not throw the error, skip the head appending and actually run the callback instead. Throwing error breaks the js while with the solution above will continue working in case you double load the same script url/id. Makes sense ?
Here's a github issue for your request: https://github.com/muicss/loadjs/issues/95
Would not be useful to add a method for adding scripts loaded by other apps to cache ? Eg: I have a list of scripts id's loaded by WordPress and instead of lazyloading the same id again, I would put that list to cache and run code directly.