Mon Oct 13 2014
Paul Shan
Node | Browser |
---|---|
Node doesn't have a predefined "window" object cause it doesn't have a window to draw anything. | "window" is a predefined global object which has functions and attributes, that have to deal with window that has been drawn. |
"location" object is related to a particular url; that means it is for page specific. So, node doesn't require that. | "location" is another predefined object in browsers, that has all the information about the url we have loaded. |
Ofcourse Node doesn't have "document" object also, cause it never have to render anything in a page. | "document", which is also another predefined global variable in browsers, has the html which is rendered. |
Node has "global", which is a predefined global object. It contains several functions that are not available in browsers, cause they are needed for server side works only. | Browsers may have an object named "global", but it will be the exact one as "window". |
"require" object is predefined in Node which is used to include modules in the app. | Browsers don't have "require" predefined. You may include it in your app for asynchronous file loading. |
In Node everything is a module. You must keep your code inside a module. | Moduling is not mandatory in client side JavaScript, i.e. in browsers. |
Node is headless. | Browsers are not headless. |
Node processes request object. | Browsers processes response objects. |
SHARE THIS ARTICLE
Thu Mar 10 2016
OAuth authentications are pretty popular now a days and another thing which is popular is JavaScript. This article shows how to plugin google’s oAuth api for authentication in your own node application.Sat Mar 01 2014
This is a continuation of my CSS3 loader snippet collection series. I've provided spinning css3 animation loader in the part 1 of this series and here in part 2, I'm providing various square type loading