We should use Jquery CDN to reduce the execution time. But sometimes the firewall creates a problem by blocking it. In this case, our Jquery code won't work. And now, We need a cross-browser solution.
To implement a cross-browser solution in the project link both Jquery CDN & file (you can download it from the official website) in the head section. And also the code, given below. Replace
jquery.js from your file.
After adding cross browser solution code, if firewall blocks CDN or any other issues occur then your linked Jquery file will execute.
Jquery cross-browser solution code
<script> window.jQuery || document.write("<script src='jquery.js'><\/script>"); </script>
<head> <title>Jquery</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="jquery.js"></script> <script> window.jQuery || document.write("<script src='jquery.js'><\/script>"); </script> </head>
Publish A Comment