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