PDA

View Full Version : Can Javascript affect website performance?



junkeeper
23 Jan 2010, 10:23 AM
Hello guys,

Here are some of my questions related to Javascript.

1) Can Javascript or Ajax codes affect the website performance? My website has a lot of ads like adsense, cpx, and I also use the Openx script. All of them run on javascript platform as well. On average, I have 4-5 ads per page. Will this increase my website loading time? Apart from the ads, I only use one single javascript code to implement my website's navigation menu.

2) My website loads pretty much the same speed as the other similar websites. But when I use the Pingdom.com's webtool to check the load test, I found out my website was categorized as Slow if compared to the others. Is it because I use plenty of javascript/Ajax (ads)?

3) I noticed many people start to use Ajax to replace flash slideshow. Can you share with me why Ajax slideshow is better than the slideshow created from Flash (SWF format)?

Can anyone shed some light please. Thanks.

Cheers,

uptownhr
27 Jan 2010, 02:36 AM
1.) Javascript , AJAX can definiately affect your sites performance. However, it really depends on the application and how it is coded. For example, a bad coded infinite loop or almost infintie loop can slow not just the load time but the user's browser. In the other hand, if you are using third party's javascript code, depending on their load and how slow it loads, will also affect your performance. For this, I recommend somehow, placing there codes at the bottom of your page, so it loads last not affecting your original content.

2.) Maybe, maybe not. Really hard to tell without more information.

3.) People tend to stray away from FLASH mainly due to the fact that it is not SEO friendly. Search engine crawlers cannot read the contents of a flash embed where as AJAX content can be read.