Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 05-30-2006, 11:43 PM
Rezo's Avatar
Senior Member
 
Join Date: 03-13-06
Location: Republic of Moldova
Posts: 256
iTrader: 0 / 0%
Thumbs up Basic ways to speed up your website

Speed is certainly one of the most important factors when it comes to making a successful web site. These days’ people have high expectations, they expect a web site to load as fast as an application on their operating system, and therefore even a few seconds of waiting can frustrate them or leave altogether.

A good website should take about 8-12 seconds (for a 56K) to load. The website owner is going to have to decide how fast its pages are going to be, for example for a multimedia or a flash site they can afford to be a bit slower than others provided that the users know the nature of the site.

Ways to speed up your website

HTML issues:

- Use CSS where possible: Because pages with stylesheets load faster than those web sites designed with font tags and tables, and also it's much faster and easier to make changes.

- Stay clear of nested tables: Nested tables are basically tables within tables, but too many of theses can really slow down the browser. When a page loads the browser starts from the top and goes down in a consecutive manner, with nested tables it has to find the end of the table before it can display the entire thing.

- Specifying height and width: For tables and images it's a good idea to specify their height and width, as it helps out the browser and therefore speeds up the process.






Thanks,
Rezo
 
Reply With Quote
  #2 (permalink)  
Old 05-31-2006, 05:33 AM
DotZero's Avatar
Member
 
Join Date: 05-22-06
Location: Brisbane, Australia
Posts: 46
iTrader: 0 / 0%
Correct me if i am wrong, but all those points probably don't make the page load any faster from start to finish, I think they just help the browser out, and make the site readable while it is still loading (eg, everything in the right place, just waiting for image).

All valid points though, anything that helps the user.
 
Reply With Quote
  #3 (permalink)  
Old 05-31-2006, 05:40 AM
Rezo's Avatar
Senior Member
 
Join Date: 03-13-06
Location: Republic of Moldova
Posts: 256
iTrader: 0 / 0%
Well yes, you're pretty right.
 
Reply With Quote
  #4 (permalink)  
Old 05-31-2006, 11:13 AM
vangogh's Avatar
Contributing Member
 
Join Date: 05-23-06
Location: Boulder, CO
Posts: 363
iTrader: 0 / 0%
I think they'll all help the site load faster. Maybe not a huge amount, but they can all help. For the most part the main thing to help speed up a site is reducing the number and size of your images. It's also a good idea to minimize requests to the server.

Far too many sites use images where a line of two of code can show the same thing. Things like solid color background images. Much of the trick is in the site design and knowing what you can and can't do with the code.

So many sites also fail to optimize their images in general. Often simply optimizing an image through phooshop (or any other image editing program) can shave 2/3 of the file size off an image. I've reduced load times on sites by 30 seconds or more just by optimizing images.

WebSiteOptimization.com
is a great site with lot's of helpful pointers to speed up sites.

Even things as simple as reducing white space in your code can shave a few seconds off download times.
__________________
YellowHouseHosting | TheVanBlog
 
Reply With Quote
  #5 (permalink)  
Old 05-31-2006, 11:39 AM
DaveyBoy's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 10-13-03
Location: England.
Posts: 3,886
iTrader: 0 / 0%
8 - 12 seconds on dial-up isn't realistic is this day and age though.

If you are still on dial-up, you make allowances as you know most sites are going to be created for at least a 512kbps connection.

Quote:
Even things as simple as reducing white space in your code can shave a few seconds off download times.
Is this true though? I always thought browsers automatically skipped these white spaces when rendering.
 
Reply With Quote
  #6 (permalink)  
Old 05-31-2006, 02:04 PM
JamieJelly's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 03-09-06
Posts: 1,250
iTrader: 0 / 0%
your download speed isnt determined by what it is downloading but by how much there is of it. Bandwidth certainly doesn't discriminate between inline styles and external stylesheets.

Real ways of speeding up your site are -
-use common classes for your CSS, thereby reducing the amount of styling code needed
-optimise your images properly and choose the right format
-don't include entire javascript libraries (prototype weighs in at 30k!), just pick the functions you use and place in a common.js file
-if your site uses a lot of js, use a code cruncher to remove whitespace and comments

A browser might ignore whitespace but it still needs to download the data
 
Reply With Quote
  #7 (permalink)  
Old 06-02-2006, 10:56 PM
sim sim is offline
Banned
Latest Blog:
None

 
Join Date: 01-23-04
Posts: 1,098
iTrader: 0 / 0%
for php and other scripting languages all calculations should be done on seperate lines.

for ex:

$num = (3 - 2) * 3
should be
$num = 3 - 2;
$num = $num * 3;

not much of a difference but is faster =)
 
Reply With Quote
  #8 (permalink)  
Old 06-03-2006, 12:04 AM
Senior Member
Latest Blog:
The Onset Of Rains

 
Join Date: 05-28-06
Location: India
Posts: 212
iTrader: 0 / 0%
Design with browser cache in mind

Client side cache can be a very useful ally


Repeating images like logos,headers,footers, menu bars dont have to be downloaded twice. The browser recognizes the file name and pulls it straight from the cache. And even if your site uses different header graphics that differ minutely, break the images so that repeating portions are pulled from the cache.

It sure does make a big difference....


Cheers,
Cloudtrance.
 
Reply With Quote
  #9 (permalink)  
Old 06-03-2006, 12:46 AM
Junior Member
 
Join Date: 06-03-06
Posts: 8
iTrader: 0 / 0%
When possible avoid pulling ad banners from other sites and cache stuff like news feeds or xml data from other sites. Minimize querys to databases on each page. Make sure your databases are well optimized.

Make sure any server side scripting is well optimized. It might seem fast now but when a site starts getting more visitors and crawlers a poorly optimized site can really eat server resources up quick. When your server starts feeling the heat your site will slow waaaay down.

Avoid lousy web hosting like the plague.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Website Speed Selection Page incakola Web Design Lobby 1 11-29-2007 01:15 AM
Basic ways to speed up your website Rifat Web Design Lobby 13 03-22-2006 12:03 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 01:30 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.