1

Yesterday I had problems with some jQuery script. I did some research and realized that the following line (in head tags) has an error:

<script type="text/javascript" src="/Scripts/jquery-1.7.2.min.js"></script>

The error was:

Request to "http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js" failed (HTTP Status: Failed)

I tried to reach the file directly with no success.

I tried to upgrade to 1.8.2 but I faced some other issues. Minutes after that... I suddenly realized that the problem was fixed... weird...

Now I encounter the same problem... I look into my code with no clue on what could be causing this error.... suddenly... the file I mention came accessible again! The error was gone.

What could be causing this? Could ajax.aspnetcdn.com servers be failing? Has anybody faced this problem these days???

Thanks in advance. PD: It's my first community question. I been back here all these years learning a lot from you guys!!

2 Answers 2

2

Trust in google :)

https://developers.google.com/speed/libraries/devguide#jquery

you can have your picking from multiple versions of jquery, and I personally have never had any problems with googles CDN :)

Sign up to request clarification or add additional context in comments.

1 Comment

If I use [link](<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>) the file is requested FROM THE CLIENT side, isn't it??? Now I'm realizing that I was totally wrong thinking that if I have my own copy of jQuery file within the server I would't had problems if my server lost Internet Connection (My app runs within an Intranet). I'm feeling creepy!!!!
0

You can use the jQuery files hosted by Google cdn.. That is the best option when you want to use for your project as it also helps reducing the bandwidth of your website.. Just include this in you page and the script will load for you

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.