Notifications
Clear all

Deferred loading or lazy load of the commenting system for wpdiscuz

16 Posts
5 Users
3 Reactions
3,012 Views
(@sirlouen)
New Member
Joined: 5 years ago
Posts: 4
Topic starter  

I've been testing wpdiscuz lately and I've found that it introduce a huge amount of resources that severely damage the load speed of the site

Is there any way to defer the loading of Wpdiscuz? 

(The youtube links are the only one not related to WpDiscuz)

 


   
Quote
(@sirlouen)
New Member
Joined: 5 years ago
Posts: 4
Topic starter  

More info:

With WPDiscuz activated + 1 comment:

Without WpDiscuz:

+1 second faster loading, nearly half the total page size, half the requests.

The page is a 3000 word article with some images and some youtube videos.

What I would like is simply defer the load of WpDiscuz after the page has loaded, for example, with an AJAX script that starts loading WPDiscuz when the user starts scrolling.


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 

Hi @sirlouen,

We've discussed with our team and decided to add such functionality in near future releases. 


   
ReplyQuote
(@peacherd)
Active Member
Joined: 5 years ago
Posts: 9
 

Hello there, 

Any news about this? Really waiting on some lazy load function to be able to use WPDiscuz and all your addons on my website.

Thanks


   
ReplyQuote
(@omriamos)
Active Member
Joined: 8 years ago
Posts: 5
 

Hi,

Any updates about this?

I have stopped using wpDiscuz because this feature was missing, and I'm currently using "Lazy Load for Comments" which is great - but only using the default WP comments system.

Please include lazy loading in wpDiscuz, and please also make sure that it will lazy load the entire module, meaning that it will also load the add-comment form (with the user's ID etc.) via ajax - this feature is critical for html-caching of the posts.


   
peacherd reacted
ReplyQuote
(@peacherd)
Active Member
Joined: 5 years ago
Posts: 9
 
Posted by: @astghik

Hi @sirlouen,

We've discussed with our team and decided to add such functionality in near future releases. 

Any idea if this is going forward? Thanks!


   
ReplyQuote
(@peacherd)
Active Member
Joined: 5 years ago
Posts: 9
 

Bump!


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 

@peacherd

I'm really sorry, but I cannot provide any ETA yet. I'll update this support topic once I get some news for you. 


   
ReplyQuote
(@peacherd)
Active Member
Joined: 5 years ago
Posts: 9
 

@astghik

Sorry for being pushy on this subject! I finally found a way to make WPDiscuz dynamic with W3 Total Cache activated so all is good, but I wouldn't mind this feature being developped when possible. 

Again, thanks for a great plugin that isn't surpassed by any! Time to get some additionnal plugins 😉


   
Astghik reacted
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 10 years ago
Posts: 4209
 
Posted by: @peacherd

@astghik

Sorry for being pushy on this subject! I finally found a way to make WPDiscuz dynamic with W3 Total Cache activated so all is good, but I wouldn't mind this feature being developped when possible.

Thank you for letting us know. It would be great to know what exactly you did to solve this conflict.


   
ReplyQuote
(@sirlouen)
New Member
Joined: 5 years ago
Posts: 4
Topic starter  
Posted by: @tomson
Posted by: @peacherd

@astghik

Sorry for being pushy on this subject! I finally found a way to make WPDiscuz dynamic with W3 Total Cache activated so all is good, but I wouldn't mind this feature being developped when possible.

Thank you for letting us know. It would be great to know what exactly you did to solve this conflict.

I'm on Wp-Rocket, and have not found a solution in that sense. According to WP Rocket good practices is the way you load the JS, which makes difficult for them to defer it. 

Not sure, but maybe Lity library is the issue by not using referring libraries

https://github.com/madrobby/zepto/blob/master/src/deferred.js

Scripts should be always loaded with the WordPress script loading functions, otherwise they will never be intercepted by most Cache plugins.


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 10 years ago
Posts: 4209
 
Posted by: @sirlouen
Posted by: @tomson
Posted by: @peacherd

@astghik

Sorry for being pushy on this subject! I finally found a way to make WPDiscuz dynamic with W3 Total Cache activated so all is good, but I wouldn't mind this feature being developped when possible.

Thank you for letting us know. It would be great to know what exactly you did to solve this conflict.

I'm on Wp-Rocket, and have not found a solution in that sense. According to WP Rocket good practices is the way you load the JS, which makes difficult for them to defer it. 

Not sure, but maybe Lity library is the issue by not using referring libraries

https://github.com/madrobby/zepto/blob/master/src/deferred.js

Scripts should be always loaded with the WordPress script loading functions, otherwise they will never be intercepted by most Cache plugins.

Sure, all wpDiscuz scripts are loaded via WordPress functions with 100% WP standards. The issue mentioned in this topic is not script loading problem.


   
ReplyQuote
(@peacherd)
Active Member
Joined: 5 years ago
Posts: 9
 
Posted by: @tomson
Posted by: @peacherd

@astghik

Sorry for being pushy on this subject! I finally found a way to make WPDiscuz dynamic with W3 Total Cache activated so all is good, but I wouldn't mind this feature being developped when possible.

Thank you for letting us know. It would be great to know what exactly you did to solve this conflict.

Sure! I basically used Page Caching Fragment feature from W3 Total Cache (mfunc) and englobed the WPDiscuz shortcode inside wpquery within the mfunc tags inside my single template.

This way, even though mfunc can't tell what post the user is looking at, which made comments_template() impossible to use, one makes the loop inside mfunc thanks to the wpquery. Thus, all the page is cached but the comment template is dynamically loaded every time.


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 10 years ago
Posts: 4209
 
Posted by: @peacherd

Sure! I basically used Page Caching Fragment feature from W3 Total Cache (mfunc) and englobed the WPDiscuz shortcode inside wpquery within the mfunc tags inside my single template.

This way, even though mfunc can't tell what post the user is looking at, which made comments_template() impossible to use, one makes the loop inside mfunc thanks to the wpquery. Thus, all the page is cached but the comment template is dynamically loaded every time.

Nice! Thank you for sharing this information.


   
ReplyQuote
(@sirlouen)
New Member
Joined: 5 years ago
Posts: 4
Topic starter  
Posted by: @tomson

The issue mentioned in this topic is not script loading problem.

True, I've checked again and now I see that the only things not deferred are the recaptcha and the Facebook connect code, which has some inline JS.


   
ReplyQuote
(@omriamos)
Active Member
Joined: 8 years ago
Posts: 5
 

This method is specific to W3 Total Cache, please don't cancel this feature request as it is essential for CDN HTML-caching of the posts pages.


   
peacherd reacted
ReplyQuote
Share:
Scroll to top