Improving perceived load times

If a page contains multiple widgets, all of the widgets load in parallel. This can cause a network bottleneck and slow load times. To reduce the pressure at this bottleneck, we can stagger when the widgets are loaded, prioritizing widgets that are initially visible to the end user.

This could be triggered from a user's scroll position, or by using a JavaScript timeout:

setTimeout(function(){
$('#div-id').append('<div class="ct-widget" data-widget-id="[WIDGET ID]" data-src="[WIDGET URL]"></div>');
window.CrowdTwist.loadWidgets();
}, 500);

This is only a perceived load time improvement because the widgets as a whole take the same amount of time to load, but it helps to improve the overall experience of the user.

Learn more

Widgets