Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
819 views
in Plugins by
edited by

Question2Answer - Use JQuery CDN Plugin

A small, but useful plugin for Question2Answer v1.8 (and v1.7) system to enable the CDN (Content Delivery Network) usage for JQuery (and only JQuery library for now, not your entire site...).

https://github.com/PELock/q2a-use-cdn

CDN? What it does?

It's simple. It replaces default JavaScript JQuery source from the local file to the hosted CDN.

Before - JQuery script without CDN

JQuery script without CDN

After - JQuery script with Google CDN

JQuery script with Google CDN

How to use it?

Go to the Admin Panel -> Plugins and enable it. That's it!

Question2Answer Use CDN Plugin

Why to use CDN?

  1. To make your site faster (check it in Google Lighthouse) it's better for SEO. Google CDN is really fast to load.
  2. To save your server bandwidth. JQuery minimized is around 30kb. Multiply that by number of the visitors to your site.
  3. To use cached copies of the same scripts used by millions of people.
  4. You can always make sure you're using the latest version of the scripts (you can specify your own CDN source).

Changes

  • v1.0 - Initial release

Bartosz Wójcik

Q2A version: 1.8

1 Answer

0 votes
by

Hello, thank you for all

I downloaded and installed the plugin, it made the change you said, but it still doesn't show cdn on gtmetrix.com, what exactly is this and how to solve it? Can you help me?

by
Show me the HTML source code of your <head> section.
by
It's working just fine. JQuery is served via CDN, look at this line:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
by
Sorry, I thought I would pull all the files over cdn.
by
Even the title of this plugin says it "Question2Answer - Use JQuery CDN Plugin" :D

Use Cloudflare if you want to serve *everything* from a CDN.
by
:D You're right, I'm sorry. I'm using cloudflare right now, thank you.
...