Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.8k views
in Q2A Core by

Loading jQuery from Google's servers is faster and is cached, so if the user already has the file from another site (very likely), the user won't have to download it again to view the q2a site, which currently happens.

Why not use this instead, Q2A team?

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">

2 Answers

0 votes
by
Good point. I also thought about it, giving the user a choice, e.g. specifying the URL to jquery would be enough freedom.

With an advanced theme, you can replace the jquery script line with a CDN; see http://question2answer.org/qa/9739/how-to-insert-jquery1-6-2
+4 votes
by
I can't speak for why Gideon decided not to use Google's CDN for jQuery, maybe at the time jQuery was added it was not very popular?

One good reason for using a local version is that you always know it's there. The externally hosted file could go down at any point (though very unlikely for Google CDN), or be blocked by a company firewall or in a particular country (I believe the Google one is blocked in China). It could also be an issue for local development if you don't have an internet connection.

Some people may also be concerned with privacy/security. Again, shouldn't be an issue with the Google CDN but at any point they could start tracking users fetching the JS file.

These issues can generally be solved by linking to the CDN version with a local fallback. But I think there should still be an option not to use the Google CDN at all. Also with the latest jQuery there are two versions providing slightly different browser support.

I'll look into this for the next Q2A version.
by
Also note the same applies to SnowFlat theme's font
by
Doesn't it just use Fontello? That's a custom pack, right?
Or have they added a new font? I am using an old version.
by
I will answer from a user's perspective: when I browse to my local q2a and I have no internet connection the font is not loaded (and, in my case, the search box looks bad)
by
I have no problems with it on offline mode, although I don't use the default search box, I made my own. This is the first release of SnowFlat (when it was called Snow) with 1.7 alpha.
by
Have you cleared the browser's cache after going offline?
...