4 ms·
Can someone ELI5 why the following doesn't exist (or please enlighten me if it does): Some kind of asset management package that will pull a javascript or CSS
by instakill 12y ago
Can someone ELI5 why the following doesn't exist (or please enlighten me if it does):
Some kind of asset management package that will pull a javascript or CSS file from a CDN if that CDN is alive. If it isn't then it can fallback to redundancy locations (maybe 2 more CDNs before requesting the asset off your own server which would act as a last-resort redundancy).
Is this possible? I imagine it could be implemented via JS.
- aikah 12y agoI did that, with an inline document.write , a technique I got from html5 boilerplate. something like if(!jQuery){document.write('<script>...');}