BlueHayes
12-06-2008, 03:31 PM
Javascript usage
Ok so I'm starting to use Javascript more when developing websites, it can do wonders! From "special" effects (clean ones not a website scattered in rubbish) to great functionality and improved interface for the end user.
How can I make sure my Javascript isn't going to cause problems with certain peoples computers/browsers, is it possible for Javascript to cause many problems (as long as there aren't endless loops and so on being ran)?
For example I was using a nice fading effect I wrote using timeouts (or an interval) but noticed with lots of usage this could cause firefox to begin seeming "laggy" for me.
Scripts running "onload", for example looping through every image element or anchor element on the page - how bad can this become if not very carefuly looked after?
Sorry I'm not entirely sure on the workings of Javascript, though I have read when searching about optimization that JS processes one thing at a time basically, in an order/queue.
Thanks for any help, again (as with other threads I've started) this could seem quite vague because there is probably so much information for me to learn on the way to true optimization.
__________________I recommend PoundHost for UK dedicated and virtual servers, without a doubt.
For cheap OpenVZ virtual servers try CheapVPS.co.uk or FsckVPS.com
Ok so I'm starting to use Javascript more when developing websites, it can do wonders! From "special" effects (clean ones not a website scattered in rubbish) to great functionality and improved interface for the end user.
How can I make sure my Javascript isn't going to cause problems with certain peoples computers/browsers, is it possible for Javascript to cause many problems (as long as there aren't endless loops and so on being ran)?
For example I was using a nice fading effect I wrote using timeouts (or an interval) but noticed with lots of usage this could cause firefox to begin seeming "laggy" for me.
Scripts running "onload", for example looping through every image element or anchor element on the page - how bad can this become if not very carefuly looked after?
Sorry I'm not entirely sure on the workings of Javascript, though I have read when searching about optimization that JS processes one thing at a time basically, in an order/queue.
Thanks for any help, again (as with other threads I've started) this could seem quite vague because there is probably so much information for me to learn on the way to true optimization.
__________________I recommend PoundHost for UK dedicated and virtual servers, without a doubt.
For cheap OpenVZ virtual servers try CheapVPS.co.uk or FsckVPS.com
