Defer JS [Deleted]

@maxicep @TBDragon @Carla Birch can anyone confirm the update properly addresses the issue? It works on my test setup, but my live site is still on 1.1 with an older version of this addon.

Thanks for your issue reports and patience in getting them fixed. Hopefully this is the last update for awhile. I will update the PHP 5.3 version once I can confirm the latest version doesn't have any issues.
Updated and all seems to be work fine with the stock xenforo editor, but my personal problem is i use the added TinyMCE Quattro and that still gives the error.
http://xenforo.com/community/resources/tinymce-quattro-and-its-wysiwyg-bbcodes.1881/
 
Last edited:
I am using the Flexile theme.
I'm going to go ahead and say this is an incompatibility between Flexile and this addon.

There's nothing I can really do with this addon to prevent things like that. Unfortunately, deferring javascript simply doesn't work for some setups or situations.

In those cases, the only solution is to not defer anything.. in which case the addon should just be disabled. Sorry.
 
Worked great. I did this and a few other things and my project is coming along nicely.

Quick question. I seem to have a bit too much white space in my markup now. Is there a way to resolve that or should I leave it alone? Sorta being picky. I am hitting almost 90 on Google Page Speed so I can live with it if need be.

Thanks for the mod. It made a bigger difference than I would have initially thought.

Nigel
 
Worked great. I did this and a few other things and my project is coming along nicely.

Quick question. I seem to have a bit too much white space in my markup now. Is there a way to resolve that or should I leave it alone? Sorta being picky. I am hitting almost 90 on Google Page Speed so I can live with it if need be.
Hmm. The addon should replace the script tags without white space, but any white space surrounding them will remain. A greedier regex seems to take care of that, I'm just not sure if it's worth adding because there's a lot of whitespace in XenForo markup to begin with. I thought about adding the option to minify HTML but it's a heavy operation so I think any performance improvements would be offset by processing time.

If you want to try replacing line 69 of library/Jrahmy/DeferJs/Deferrer.php with:
PHP:
'/\s*?<script.*?>.*?<\/script>\s*?/is',

.. and line 107 with:
PHP:
$this->deferred .= trim($matches[0]);

..but the only proper "solution" is HTML minification which just doesn't seem worth it.
 
Hey, thanks for the quick response. I could not quite wrap my head around the regex to do that. I will let you know how it goes.

I am not a huge fan of minifying much of anything either.

thanks again!
Nigel
 
I've included the regex above ;) Minifying HTML isn't terrible in production it just requires slow preprocessing that negates any performance benefits. Not worth the bump in pagespeed points. Page Speed is nice for getting tips, but a perfect score shouldn't be sought over imo.
 
Yep, I caught the code thanks. I may have misspoke. And I agree. I am an seo guy. I cant help myself sometimes. Its plenty fast as it is. Its just something that crossed my mind so I figured I would ask.

Thanks again. I can swap that code shortly . I am doing 3 things at once today. Tad hectic around here.

N.
 
Thanks for the addon, Jeremy.

A question: By checking my code and seeing that the <script> tag is right before the </body>, I can assume that It worked great without any issue, right?
 
When I was installing the XML file, it made my entire site go to a blank page even backend. I had to remove the directory via ftp in order to get the site back live. I am running 1.3
 
Thanks for the addon, Jeremy.

A question: By checking my code and seeing that the <script> tag is right before the </body>, I can assume that It worked great without any issue, right?
Yeah.

When I was installing the XML file, it made my entire site go to a blank page even backend. I had to remove the directory via ftp in order to get the site back live. I am running 1.3
On PHP 5.4+ ? I can't reproduce at all. Blank pages are usually PHP errors, there was nothing in your XenForo or server error log?

Bombed out installing on 1.3 !
That's not very helpful. What PHP version? What do you mean by "bombed out?"

Error reports should be detailed.
 
Top Bottom