3 ms·
Websites using cdns should always use a server hosted backup, it's not that hard <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.j
by tangue 9y ago
Websites using cdns should always use a server hosted backup, it's not that hard
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
if (typeof jQuery == 'undefined')
{
document.write(unescape("%3Cscript src='/serverHostedJquery.js' %3E%3C/script%3E"));
}
</script>
- seanwilson 9y agoIt's annoying to test though. You'd be better self hosting everything and putting a CDN in front of your site.
- codedokode 9y agoIs not it better to serve scripts from your server? It gives you more control and you don't have to share your visitors data with Google. With external hosting you get more downtime, and in some countries Google servers are blocked so you get less visitors.