Fallback on Local jQuery If CDN Fails is ok, but how to control the time to wait? How much should we wait before download the local copy of jQuery?
I would say immediately, because calling the jQuery’s CDN version is a http request, so if it comes back bad (404), its going to move on to loading the next resource.
If for some reason you DO? want to wait you could add
< script src="whatever.js" defer>< /script >
or for some reason delay loading a script until something else happens, or by a timer.
defer: Specifies that the script is executed when the page has finished parsing (only for external scripts)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".