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

How can I use CDN for this javascript file used in Q2A Core? Because this javascript file uses more time to load.

Also Can we load this file in defer and async as google recommends using defer and async for non-essential javascript file.

Also, can we put this file at the bottom? currently, this placed at the top in q2a core.

Default IN Q2A - https://www.question2answer.org/qa/qa-content/jquery-3.3.1.min.js

Needed - https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js

Q2A version: 1.8.4
by
Does this solve it? https://www.question2answer.org/qa/9739/how-to-insert-jquery1-6-2

Also it’s not possible to put jQuery at the bottom because plugins may add JS at the top that depends on it.
by
Thanks @Scott for comment. But I think you have explained there to add into head tag and we need to add into footer.

1 Answer

0 votes
by

I am using BunnyCDN to deliver static content (JS, CSS, and Font files) on my website. Although the changes are very small, it took me a couple of hours to figure out the codes that I need to change. Thanks to the Github page of Q2A; finding the required codes became easier.

I have written all the steps here - https://www.discoverbits.in/post/how-to-use-cdn-for-static-content-javascript-css-font-files-in-question2answer-cms/

See if it works for you.

...