Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
2.4k views
in Q2A Core by

I'm trying to optimize my website and get to the lowest page loading times as possible. I measured the website speed via http://www.webpagetest.org and it seems that one of the major time consumers is the jquery file which needs to be loaded on every page.

Is there a way to remove the use of jquery in Q&A? The only use for it which I remember is in picking categories when posting a question. If it's not possible to remove it completely, is it possible to only load the jquery javascript file only on the new question posting page and not all pages (aspecially answers view pages)?

I'll mention that these are more measures I'm taking after going through the optimization steps which are offered at http://www.question2answer.org/optimize.php.


Thank you for the help.

3 Answers

+1 vote
by
BTW, jQuery is also used for voting. As for a solution, you can go back to an older version of Q2A which used a smaller Javascript library. The reason I decided to migrate to jQuery was the large number of people asking for it, and now plugin developers can safely assume it's part of the Q2A platform.
by
Any chance it will turn to a configurable option in 1.5?
Thanks!
by
Not likely I'm afraid.
by
Is it possible to tell Q2A that jQuery is already being used on the page? I have one script (used across the whole site) that has jQuery plus my menu and other bits, so I don't need it loaded again on Q2A. But obviously I can still use jQuery for voting etc.
0 votes
by
Once Jquery has been loaded on the first page view it's then cached and therefore doesn't need to be loaded again.

So while your first page load will be longer, all subsequent pages will be far quicker
by
Most of our traffic (and I assume it is similar in most Q&A websites) is one-page traffic which comes from search engines (someone searched for an answer to a question, found it, and left). Therefore, most of the visitors will experience the first-page slow loading.
I am more concerned about the loading time of the first page then the following ones.
by
Where in the world is your traffic coming from. If it's Europe or the US, then it's pretty likely that they are going to be connected via ADSL or cable and will therefore not notice the 80K download
0 votes
by
For best jQuery loading times the Google Libraries API should be used.  Most visitors will have come across a site that has already loaded the library.

http://code.google.com/apis/libraries/devguide.html
...