Posts Tagged ‘jquery’

How to avoid long page load when using Jquery Plugins

Saturday, October 18th, 2008

Introduction

jQuery is great. But the best is the that you can use tons of jQuery plugins for each amazing functionality you want to provide. And you can implement it right away without spending a couple of months doing javascript web development and all the pain in the ass that means (even when Jquery makes your life easier regarding that).

But then comes one problem:, you want autocomplete plugin for some forms, you want blockUI plugins for the ajax calls, you want ClueTip plugin for nice tips/help when people submit forms, you want the form plugin to submit your forms through ajax and if that wasn’t enough, you need to load a 4kb js file full of code to provide some amazing functionality.

That’s great, your site kick ass, but your page takes some times between half a minute and a minute to load, and worst: when someone leaves your page, the browser needs at least 10 seconds to be able to leave your page thanks to all the js code you put over it.

In this article you will find a simple solution to that problem, that works great (at least for me). The only js requirement on my systems are: jquery library & jquery blockUI plugin. Any other plugin/js code I need, I only load it on demand, when the user really need it, and I make that user wait when he want that functionality for the first time, instead of make every user wait even when they don’t need that functionality.

Read more…

Translations: