In the PHP file where jquery is loaded I have added this code:
<script type="text/javascript">
//<![CDATA[
window.jQuery || document.write('<script type="text/javascript" src="js/jquery-1.10.2.min.js"><\/script>');
//]]>
</script>
This code tells the browser that if there is no internet connectivity,the jquery files must be “taken” from a local folder.
I am building a web app locally and I want jquery files to be available even when there is no internet connection…
And here is my issue:
I think that such code is meaningless in production environment cause simply in the case of loss of internet connectivity the user will see the usual browser message.
So my question is if you think I should remove this code when going into production.