Javascript and recources

Busy's picture

He has: 6,151 posts

Joined: May 2001

Say for example a web page has a count down clock (counts down to 1st Jan 2005)

The numbers ticking over would suck up some resources, would they not?

Who supplies the recources for this, the server or the client PC ?

I would of thought since Javascript is client side the client PC would but have been told different.

Any input into this?

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Client, surely. Where did you hear the server handles this?

Busy's picture

He has: 6,151 posts

Joined: May 2001

Abhishek Reddy wrote: Client, surely. Where did you hear the server handles this?

Some so called Javascript guru.

He has: 1,758 posts

Joined: Jul 2002

If it's Javascript all the processing is done on the client side. Definatly.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

You might have special cases where the script sends a request to the server. Or perhaps the guru was referring to a time server, like NTP.

Broadly speaking, no, processing is client-side. Imagine if you did a File > Save As and ported the document/application to another computer, or perhaps you cut the network cord, you'll lose ability to communicate with the server. If the script still works, you have your answer. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.