Avoid Including External JavaScript Files on Your Joomla Website

A client called us today and told us that even though his website is loading properly, he’s noticing that the “Transferring Data…” message at the bottom left of Firefox is taking forever to disappear, as if Firefox hasn’t finished loading the page (when, again, the page is fully loaded). We knew immediately what the issue was: this usually happens when Firefox (or any other browser) is trying to load an external file (the external file can be an image, a CSS file, or a JavaSript file) that is located on a slow website.

We did a quick investigation using Google Chrome (here’s how: we loaded the website in Google Chrome, and then right clicked, chose Inspect Element, clicked on Network, clicked on Time, and then refreshed the page – the slow loading file could be found at the bottom of the debug window) and discovered that the file that the Joomla website was trying to load was a JavaScript file responsible for adding the “Read more on… [link to the Joomla page]” when pasting copied content from a page. That script was located on a 3rd party website that was extremely slow.

We then told the client that he should disable the plugin that is responsible for loading the script, but our client told us: “But this functionality will increase my traffic…”

We told him that this is not true, this kind of technique doesn’t increase traffic. While it can have a positive effect on very large and important websites, most people will not leave the line “Read more on…” on their pasted content if the website they have copied from is not well known. Sad, but true!

Additionally, the problem with this tool (or whatever you want to call it) is that it pollutes the web, simply because it adds a hash to the URL. That hash means something only for that tool (the hash is mainly used for tracking how many people shared the link and how many people clicked on the shared link – of course, this information is sent to the 3rd party website and never shared with the site owner himself).

Furthermore, there is a huge issue with this tool, and it is that any external JavaScript file can be used to steal keywords and other important information from the host website. An external JavaScript file can also potentially read what your users are writing on your website, including, but not limited to, their usernames and passwords. Now you might be thinking “This can’t be true”, but think about it this way, why would that 3rd party website allow you to use that tool for free, and why do they host such a simple tool on their website instead of yours? As the old saying goes “There’s no such thing as free lunch”…

Finally, an extension that includes external files can slow down your whole website, and can jeopardize its rankings if the required external files are deemed to contain some sort of malware.

Bottom line, ensure that all the files that you are including on your website are actually located on the same server or one of your servers – never trust files that you cannot change yourself.

If you’re having the same problem on your Joomla website, and if you are not able to find the culprit extension, then why not contact us? We’ll find it for you in no time and we won’t charge you much!

No comments yet.

Leave a comment