views:

172

answers:

8

Which is the BEST way to optimize a web site for faster download without affecting my ranking?

How do I optimize my CSS file and images?

+4  A: 

That's two completely different questions.

To optimize download speed use something like minify.

To rank higher in search engines, provide content that people want to see in an easily accessible way, and the high search ranking will come by itself.

Mark Byers
And enable gzip if possible.
Michael Myers
That's one of the features minify has: "Content-Encoding: gzip, based on request headers."
Mark Byers
A: 

As Mark Byers noted, these are two separate questions. In regards to web performance, you might be interested in the Performance Advent Calendar 2009, an interesting series about different ways you can improve the performance of your web site.

akamike
+8  A: 

If you have Firefox download Yahoo's YSlow plug-in for Firefox. It will look at your site and suggest things you can do to speed it up.

http://developer.yahoo.com/yslow/

Chad
YSlow is very good for building up a picture of what's making your site slow.
Tom
+1: YSlow is definitely *the* tool to find performance holes in your webapp. Its technical performance advices are however only limited to IIS+ASP and/or Apache+PHP. For advices in Java/JSP/Servlet perspective this article is more useful: http://balusc.blogspot.com/2009/09/webapplication-performance-tips-and.html
BalusC
+1  A: 

If you use a lot of images in your CSS, the use of CSS sprites can reduce the amount of HTTP requests needed to generate your page. Sprite Me can help build it for you.

Jorbin
+1  A: 

Make pages primarily for users, not for search engines. Don't deceive your users or present different content to search engines than you display to users, which is commonly referred to as "cloaking."

Avoid tricks intended to improve search engine rankings. A good rule of thumb is whether you'd feel comfortable explaining what you've done to a website that competes with you. Another useful test is to ask, "Does this help my users? Would I do this if search engines didn't exist?"

Source

Nimbuz
A: 

For reducing bandwidth I have been using web site maestro for a few years, it's great.

Rob
A: 

“which is the BEST way to optimise a web site for faster download”

HTML/CSS/JavaScript

Gzipping. In my limited experience, this tends to reduce HTML, CSS and JavaScript file size by about 60–70%. If you do nothing else, do this.

After you’ve done that, minifying your code can knock off another 5–10%.

Images

JPG for photographs, set the quality as low as you can without it looking unacceptably bad. (You can generally halve image size, with no noticeable visible difference to the image, using 70–80% quality.)

PNG for images with gradients and whatnot. Use pngcrush to get these as small as possible.

GIF for small images that only use a few different colours. Save them with the smallest colour palette. (In PhotoShop, see Save for Web.)

Other

After you’ve done all that, pop your stylesheets, JavaScript files and images up on a CDN, e.g. Amazon Cloudfront. This will almost certainly deliver the files quicker than whatever server you have.

Have as few stylesheet, JavaScript and image files as well, to reduce the number of HTTP requests. Spriting your CSS background images can help with with this.

The Basics

But, as always, measure. Don’t blindly apply anything we’ve told you here. Measure how quickly your site’s downloading. Make a change. See if it speeds up your site, or slows it down. And balance any speed improvement you get against other factors, e.g. how much more difficult the code is to understand and maintain.

“without affecting my ranking”

That’s pretty much up to Google. I haven’t heard of any of the approaches suggested here causing issues for search engines. If you want to show up high in search results, get everyone on the internet to link to you.

Paul D. Waite
A: 

Check out Google Page Speed for a Firebug plugin that will test and recommend things you can do to speed up your pages.

http://code.google.com/speed/page-speed/

As far as SEO that is a far more complicated issue.

The best advice I can give you is to make your content the best you possibly can, include your keywords in your page title and page url.

Those 3 things will make the most impact of than all the other advice you will hear.

Jeffrey Hines