Defer JS [Deleted]

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
Have you tried adding scripts related to those add-ons to the blacklist? If they require jQuery or anything else they should be blacklisted too.

I don't have access to those add-ons so I can't say for sure.
 
I assume that since my notices at the top dissapeared with this add-on, I have to blacklist them right? So it skips it?

Edit:

My UAT site is 1.4.6 and the notices are still showing as it should.

Live site is 1.4.5 and notices are gone.
 
Last edited:
@Jeremy P my site is www.spillforumet.no

Update:

1) I had to delete all notices, and re-add them - they now show
2) Page criteria does not work now, so if I want the notice to show on all forumnodes, besides 2-3, it wont show at all. If I dont use that criteria, it shows as intended.
3) If I choose not to use page criteria, the notice show as normal
 
@kaieivindm I can't reproduce, there's not really any way this add-on could cause that.

Notices are enhanced by JS but not displayed with it. Notices are in the plain HTML source.

Even if I disable JS entirely at the browser level, notices with page criteria still appear fine on my site (they just don't slide or transition).
 
If you disable the add-on, it will stop making any changes.. so it shouldn't be too worrisome to try out unless you can't afford to (potentially) break your site momentarily.

In my experience, most things usually work fine with JS deferred, but YMMV. Just remember if anything does need to be blacklisted, then you will have to blacklist its dependencies too (jQuery is a common dependency, for example).
 
If you disable the add-on, it will stop making any changes.. so it shouldn't be too worrisome to try out unless you can't afford to (potentially) break your site momentarily.

Ok thanks. Did give it a go, great performance boost! Sadly my ads are messed up:
bug js.webp
 
Ads are the one common exception to deferring JS. Adsense is blacklisted by default, but others would have to be blacklisted manually.

If you blacklist your ads in the options then it should be fine.
 
@kaieivindm I can't reproduce, there's not really any way this add-on could cause that.

Notices are enhanced by JS but not displayed with it. Notices are in the plain HTML source.

Even if I disable JS entirely at the browser level, notices with page criteria still appear fine on my site (they just don't slide or transition).

I agree with you, it should not be affected by this add-on at all. I did upgrade my live site with 1.4.6 as my UAT was working just fine with this add-on and the notices. But there is something with the live site that I just can't get to work.

But the cause should not be this add-on, thanks for the replies.
 
Thanks a lot! Works properly with my own inline JS/CSS minify add-on after tweaking the execution order of my add-on a bit. Also the blacklist system was so straightforward that I had no trouble at all to exclude IE conditionals.

EDIT: I ended up merging Deferred.php into my own personal add-on. I hope you don't mind, right? I left all the comments untouched and only edited the code a bit. Besides it's personal add-on though. I just want to avoid any possible conflicts.
 
Last edited:
Hello Jeremy, thanks for share this great mod!
Besides install the addon, I have to do something more?
In my case never defer the scrips, the report of GTmetrix always show the same:
Screen shot 2015-07-27 at 8.02.09 PM.webp
 
Top Bottom