开发者

Which is the BEST way to optimize a web site for faster download and SEO? [closed]

开发者 https://www.devze.com 2022-12-13 21:38 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Clo开发者_高级运维sed last year.

Improve this question

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?


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/


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.


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


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.


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.


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.


“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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消