Check if Internet Connection Exists with jQuery? [duplicate]
The best option for your specific case might be: Right before your close </body> tag: <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js”></script> <script>window.jQuery || document.write(‘<script src=”js/vendor/jquery-1.10.2.min.js”><\/script>’)</script> This is probably the easiest way given that your issue is centered around jQuery. If you wanted a more robust solution you could try: var online = navigator.onLine; Read more about the W3C’s spec … Read more