Questions related to HTML, CSS, PHP, MYSQL and Javascript

  • junkeeper
  • Born
  • Born
  • junkeeper
  • Posts: 1

Post 3+ Months Ago

Hi,

I need to seek some advice from the gurus here:-

[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 dot 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)?


[4] What are the benefits of using the new XHTML 1.0 compared to HTML 4.01 specification? Currently my website is using HTML 4.01 Transitional doctype. Will it affect the current site layout if I change to XHTML 1.0? Does this new format supports the older browsers like Netscape 2 and IE 3.02?


[5] I found out there are many ways to cache a website content to make the website load faster. But I'm not sure which method is better than the others like for example HTTP Cookie and Server Caching. If a website like mine that uses MYSQL database and retrieve a lot of data to display on user's end, what caching solution is the best?


[6] My database size is growing larger and larger each day and I assume this will have an impact on the website performance sooner or later. What are the best tools available to test MYSQL performance and how can I scale the database further without having any impact on performance?


[7] There are many PHP scripts available from the open source community and retail market. Some spec out the requirements and specifications in very details but unfortunately some don't. How can I be sure the script can support a big traffic site? Often I heard many scripts are written for website with smaller traffic in mind and they will start to behave strangely if the traffic started to grow.


[8] As we all know, there are two ways we can implement the CSS on a website. There are Inline CSS and External CSS methods.
Some people claimed the Inline CSS will process faster as the codes are embedded into the HTML codes itself. Is it true? Also, is there any impact on the page size?


Your comments would be very much appreciated. Thank you.

Cheers,
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • dyfrin
  • Expert
  • Expert
  • User avatar
  • Posts: 503
  • Loc: WI

Post 3+ Months Ago

junkeeper wrote:
Hi,

I need to seek some advice from the gurus here:-

Will only answer those I know =p
Quote:
[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.

Yes. Any external lookup can delay a page from being loaded. To combat this, make sure when dom is ready then you replace content placeholders with the ads so your content loads first then ads can time out if they want.
A test is to fill the ad place with a bogus port, creating a delayed timeout.

Quote:
[2] My website loads pretty much the same speed as the other similar websites. But when I use the Pingdom dot 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)?

The ratings are adjusted on file sizes and the amount of scripts, images, pages for a single page to pull. To use image headers or borders, it is often better to have a single png and source the image on it, so one file to download and refrence.

Quote:
[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)?

No flash, Ajax will still play.
No javascript enabled, neither will play usually.
Flash has better animation but for little transitions ajax is good.

Quote:
[4] What are the benefits of using the new XHTML 1.0 compared to HTML 4.01 specification? Currently my website is using HTML 4.01 Transitional doctype. Will it affect the current site layout if I change to XHTML 1.0? Does this new format supports the older browsers like Netscape 2 and IE 3.02?

Backward compatibility? Not sure.
It is a semi-major change though, don't do it on a whim.

Quote:
[5] I found out there are many ways to cache a website content to make the website load faster. But I'm not sure which method is better than the others like for example HTTP Cookie and Server Caching. If a website like mine that uses MYSQL database and retrieve a lot of data to display on user's end, what caching solution is the best?

Ok here is where you have a lot of options. cookie is good, never use flash cause people hate being tracked when they hit delete history and it is still there.
The template should cache the content if changing often should not.
Using two hosts to deliver content greatly increases page load time. Using img.website.com to load all images from is prefered.

Quote:
[6] My database size is growing larger and larger each day and I assume this will have an impact on the website performance sooner or later. What are the best tools available to test MYSQL performance and how can I scale the database further without having any impact on performance?

Database size has minor impact as long as it is indexed correctly for what you are searching by to return results.


Quote:
[7] There are many PHP scripts available from the open source community and retail market. Some spec out the requirements and specifications in very details but unfortunately some don't. How can I be sure the script can support a big traffic site? Often I heard many scripts are written for website with smaller traffic in mind and they will start to behave strangely if the traffic started to grow.

not sure.

Quote:
[8] As we all know, there are two ways we can implement the CSS on a website. There are Inline CSS and External CSS methods.
Some people claimed the Inline CSS will process faster as the codes are embedded into the HTML codes itself. Is it true? Also, is there any impact on the page size?

Always external file, why? Site wide changes in one file. Also if you need to supersede the style, inline is higher in authority and will ignore other markup.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

Quote:
[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.


In my experience Javascript-based Ads are the biggest contributers to page load time.

For example sake here, a typical Google Adsense ad first loads the external javascript from Googles servers, which takes time. Once that script loads it looks around the document and determines a bunch of things it wants to know before making another request back to Googles servers. This second request also takes time. During the second request, Google might have the Mediapartners-Google bot request the same page the visitor is looking at but from Googles servers. This means that before the ad is displayed, both the visitor and a Google server will download the HTML. Google also processes the downloaded page on their server during this second request.

So to recap, to display a page with an Adsense ad on it the flow will typically look like this,

Code: [ Select ]
Visitor -> you -> visitor -> Google -> visitor -> Google -> you -> Google -> visitor


Other Javascript-based ad networks generally have similar workings.


Quote:
[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)?


Lower development and maintenance costs.
Search engines are better at parsing Javascript than they are Flash.
Fewer people browse with Javascript disabled than do with Flash disabled. (this point is probably negligible though)

Quote:
[4] What are the benefits of using the new XHTML 1.0 compared to HTML 4.01 specification? Currently my website is using HTML 4.01 Transitional doctype. Will it affect the current site layout if I change to XHTML 1.0? Does this new format supports the older browsers like Netscape 2 and IE 3.02?


Pretend the answer to this question is in Pandora's box. No good will come from it.


Quote:
[5] I found out there are many ways to cache a website content to make the website load faster. But I'm not sure which method is better than the others like for example HTTP Cookie and Server Caching. If a website like mine that uses MYSQL database and retrieve a lot of data to display on user's end, what caching solution is the best?


I try to create static HTML cache files whenever I can. Past that I don't like to say anything without having worked with the website for awhile to get a feel for where the load comes from, what's popular when, etc.


Quote:
[8] As we all know, there are two ways we can implement the CSS on a website. There are Inline CSS and External CSS methods.
Some people claimed the Inline CSS will process faster as the codes are embedded into the HTML codes itself. Is it true? Also, is there any impact on the page size?


Both methods have their uses. It's a lot like asking which hand you should wave at someone with, it depends on what you're doing each time you want to wave.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 70 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.