Find your content:

Search form

You are here

AJAX vs WEBSOCKETS vs Webworkers

 
Share

Ajax vs Webscokets vs Webworkers

Ajax - As abbreviation states is asynchronous javascript and xml. It runs on UI thread.

Websockets - It is html5 feature. It is a protocol providing full-duplex communications channels over a single TCP connection so this is mainly used for real time communication such as video call and live chat etc.

Webworkers -  It is used to bring multi threading feature in javascript. Since javascript is single threaded programming language, it breaks or pause whenever heavy calculation tasks are done using it. to overcome this breakage web workers are added to javascript. It runs on background thread.

You can perform Ajax and websockets inside web workers however you cannot manipulate DOM using web workers due to security reasons.

My Block Status

My Block Content