views:

129

answers:

4

Hi all

Will any one please explain me what is server side java script and client side java script

Because i recently heard about livewire javascript is server side and navigator javascript is client side.

kindly any one explain me the difference

Thanks in advance

Fero

+1  A: 

One runs in the browser (client side), the other runs on the server. JavaScript is commonly believed just to run on browsers- this is incorrect. When I was a classic ASP developer we had the choice of VBScript or JavaScript server side (we also had the choice of JavaScript or VBScript client side too).

RichardOD
A: 

These two terms are used in the context of web. Client-side means that the JavaScript code is run on the client machine, which is the browser. Server-side JavaScript means that the code is run on the server which is serving web pages.

Ionuț G. Stan
+1  A: 

There are 3 major types of JavaScript namely:

  1. Client-Side JavaScript (CSJS) -- an extended version of JavaScript that enables the enhancement and manipulation of web pages and client browsers

  2. Server-Side JavaScript (SSJS) -- an extended version of JavaScript that enables back-end access to databases, file systems, and servers

  3. Core JavaScript -- the base JavaScript language

Client-Side JavaScript (CSJS) and Server-Side JavaScript (SSJS) are dependent on the core JavaScript and cannot work without it.

Source

rahul
+2  A: 

For most part in the modern web, javascript is 99% times client side (yes I made up the statistic).

That said, javascript is just another language. Back in the olden days, there was the Netscape Enterprise Server (NES it was called) which allowed scripting in javascript.

Modern web servers support scripting langauges like php, python etc. Its unfortunate that js is not big on the server side. Its the single most beautiful language I've encountered: the syntax of C, with the power of something like Lisp.

The conventional client side usage of javascript alludes to its use in the web. I'm sure you know all about javascript on the web (if you are intelligent enough to ask about ssjs).

But some unconventional uses of javascript:

  • However, Qt has found use for javascript in its framework. Qt applications can be written to be extensible by addons written in javascript. I think its pretty cool.
  • There is also Rhino, that compiles javascript into Java.

Cheers!

Here Be Wolves