let run long runing task in background in javascript

So When I am in javascript development I had a long running javascript method which delays page loading. So I wanted to make it run in background to protect responsiveness of application. So I found Differed execution in Jquery.  Using differed execution we can run functions in background and do another stuffs as we want. And we can pass callback function to execute on after finishing the long running function.

Code Sample on jsfiddle

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s