Defer JS [Deleted]

Consider the following in your HTML source:
Code:
<script src="https://dogs.com/dogs.js"></script>
<script src="https://cats.com/cats.js"></script>

Entering "dog" in the blacklist will stop the first from being deferred, entering "cat" in the blacklist will stop the 2nd from being deferred, and entering ".com" into the blacklist will stop both from being deferred.

So anything that is unique to a particular script tag may be entered to blacklist the respective script from being deferred.

I don't see Google Analytics on your site's source currently or I would give more concrete examples.
 
You're right it's there.. must have glossed over it since it was minified ;) Looks to be at the top now.
 
No problem, I think it should be moved together because you're right it will break.
As it turns out it is kind of a hassle to check for conditionals around scripts. I will add a note about blacklisting scripts in IE conditionals to the readme/options.
 
Anybody try to install this with PHP 5.5? I assumed that 5.4+ meant that 5.5 would be ok, but it immediately started forwarding my site to one of the adsense ad links. Uninstalled as quickly as possible, hopefully I didn't get too many ad clicks showing up as a result of that, LOL.
 
I run this on PHP 5.5 without issue. You may need to blacklist your ad scripts. Adsense is usually blacklisted by default (if you use their default setup), so it may be one of your other scripts interfering.

I wouldn't recommend this add-on to those who aren't entirely sure what it does. Take some time to learn about what it does and why, and how it may affect your site, especially with custom scripts. It may require some tinkering to get it to work properly.. it's not quite "install-and-forget."
 
This add-on is simple and I want to keep in that way. It doesn't do much hand-holding, so I only recommend using it if you know what you're doing.

By default, everything (but some predefined ad scripts) is deferred. If it breaks something, then you need to add the broken script (and all its dependencies, which may or may not include jquery) to the blacklist.

If you don't know how to figure out what script is breaking what, then this add-on is probably not worth the trouble. You will likely save more time not installing it than all your visitors will in page-load-time with it installed, combined.

Social login and buttons should be working while deferred, but if they are not then you'd have to blacklist them and their dependencies.
 
When this add-on is enabled, I get a js error when editing the PAGE_CONTAINER template:

Code:
Uncaught TypeError: Cannot read property '_visitor_conversationsUnread' of null

I just updated to 2.2.1, and am still getting the error. This stops the javascript from executing, meaning includes don't load & ajax submission doesn't take place.

Liam

EDIT: Nevermind, blacklisting 'xenforo' and then removing it from the blacklist resolved the issue :)
 
Is anyone experiencing an issue when opening forums, the page is scrolling to the bottom?
Disabling Defer JS fixes the issue.
https://xenforo.com/community/threa...rolls-the-page-to-the-bottom-in-chrome.84955/
Could we revisit this please, @Jeremy P ?
It happens on these pages.
https://www.avforums.com/forums/movie-forum.37/
https://www.avforums.com/forums/tv-show-forum.55/
It seems to be a compatibility problem with @Snog 's two TMDB addons.
Any ideas?
Thanks
 
Last edited:
Top Bottom