'Referencing jQuery library on Google APIs and Relative path

In my Asp.Net Web Application, I have given a reference to jQuery library on Google APIs as below:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

Problem: few devices do not have an internet connection, and the JQuery download fails.

Providing the local file reference like below solves the problem:

<script src="~/Scripts/jquery-3.5.1.min.js"></script>

Question: If google APIs fail to download the file(If no internet) then I should take the local file reference, Is there a way to implement it?



Solution 1:[1]

If you are worried, that ajax.googleapis.com may be unavailable at the particular moment, when you want to load jQuery 3.5.1, then simply include and deploy the library with your Asp.net web application.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mario Varchmin