February 10, 2009

How to make your website really, really fast

February 9th, 2009

Posted by Andrew Mager

Steve Souders knows how to make a website speed through a web browser.

cialis ejaculation href=”http://www.flickr.com/photos/mager/3267072847/” title=”Steve Souders from Google by magerleagues, on Flickr”>Steve Souders from Google

And he works at Google, one of the fastest websites around.

Web performace is a two-pronged beast: efficiency and response time. Efficiency deals with the scalability challenges of building a top 100 global website. You have millions of users and billions of page views, and it’s awe-inspiring to understand the full scope of the backend architecture of something that large.

The set of directions that the HTML document gives to every process really determines the speed of the page.

On iGoogle for example, only 17% of the page is backend, non-cached data and needs to be requested each time. The rest is front-end processing.

80-90% of the end-user response time is spent on the front-end. Start there when you want to figure out how you can make your site faster.

If you can cut this front-end time in half, your users will notice it.
Offer greater potential for improvement and notice simple performance tweaks on the backend too.

14 tips for performance

  1. Make fewer HTTP requests
  2. Use a CDN
  3. Add an Expires header
  4. Gzip components
  5. Put stylesheets at the top
  6. Put scripts at the bottom
  7. Avoid CSS expressions
  8. Make JS and CSS external
  9. Reduce DNS lookups
  10. Minify JS
  11. Avoid redirects
  12. Remove duplicate scripts
  13. Configure ETags
  14. Make AJAX cacheable

YSlow is a Firebug extension that gives developers the chance to analyze every slow part of your website and test it against the 14 points mentioned above.

O’Reilly Velocity is a web performance and operations conference co-founded by Souders and Tim O’Reilly. There should be some really good talks this year.

Souders also taught a class at Stanford called High Performance Websites.

Why focus on Javascript? They have a huge impact on the page load time.

Time spent on the front end

AOL has about 5 scripts accounting for about 60 or 80% load time.

Why focus on Javascript?

Facebook has about a megabyte of Javascript.

Why focus on Javascript?

JS is downloaded sequentially, even if the HTML document has already been downloaded. It won’t draw anything on the screen unless the script is finished downloading.

Cuzillion is a tool that does batch testing on webpages.

Cuzillion from Steve Souders

HTTPWatch is his preferred packet sniffer.

If you can split the Javascript in what’s needed to render and “everything else”, you will dramatically improve your page load time. Microsoft has a whitepaper that talks about how this can be done automatically with something called Doloto. Look at the source code of MSN.com and see how they do it.

Steve Souders from Google

But even if you can split the initial page load, you will still have external scripts that will have an impact on your page.

There are many ways to make your scripts load all at the same time. XHR evaluation is an option but you are open to XSS attacks and all scripts must have the same domain.

Fast websites by Steve Souders

Putting a script in an iframe causes the JS to be downloaded in parallel with other resources on the page. You can use the DOM method for creating the head element using createElement.

Try the <script defer src="file.html">. This works in IE and FF 3.1, but it’s not the best method. Domains can differ and you don’t have to refactor your code though.

Don’t even use the document.write method. It’s terrible for many reasons.

It’s always good to show busy indicators when the user needs feedback. Lazy-loading code sucks, but the user needs to know that the page isn’t done.

Ask yourself three questions:

  • What’s the URL of the script?
  • Do I want to trigger busy signals?
  • Does this script have to be executed in order or not?

Fast websites by Steve Souders

Sometimes the user is waiting for their inbox to load, and you need the scripts to load in order. Other times it won’t matter.

The best part: none of these techniques are that hard to implement.

Don’t let scripts block other downloads either.

Stylesheets load in parallel, but if you have a stylesheet followed by an inline script, parallel downloads are broken.

Also, use link instead of @import.

Here is a link to Souders’ UA profiler. It’s a chart of all the compatibilities among all browsers regarding fast loading pages. Or as Souders puts it, a “community-driven project for gathering browser performance characteristics”.

He also built something called Hammerhead, which adds a little tab to Firebug that tells you the load time of the page. It also clears the cache in between load times. You can compare websites side by side too.

In HTTP 1.1 you can do transfer encoding in chunks. Your browser can un-gzip even a partial HTML document and start parsing it before the stylesheet is even loaded. CNET.com does this.

IE7 will open two connections per server name, unless the traffic is HTTP 1.0. Optimize images with smush.it

Takeaways

Focus is on the front end. Many front end engineers are learning on the job, kinda teaching themselves. It’s an under-represented but a critical part of the web community.

Everything is going Javascript. It’s the most painful thing to deal with on the page, and we need to identify and adopt some best practices in that space.

Speed matters. If you are waiting, you get bored and frustrated. When Google slowed down 500ms, they lost 20% traffic. Yahoo sped up their search results page only 400ms, and they got 5-10% faster. Amazon ties a 100ms latency to 1% sales loss. A faster page has an impact on revenue and cost savings.

Here is a link to Steve’s presentation »

Souders wrote High Performance Websites in 2007.

Permalink • Print • Comment

February 9, 2009

What have we done?

February 7th, 2009

Posted by Phil Wainewright

What have we come to when a respected VC feels no shame or embarrassment when actually publishing a blog post entitled When Talking About Business Models, Remember That Profits Equal Revenues Minus Costs, as Fred Wilson did last weekend? Has the world become so blind to the basics of commerce that it needs reminding of such a basic tenet?

Apparently yes. Even Wall St can’t count, as Robert Cringely revealed last week. (An analyst at JP Morgan came up with a graphic to illustrate the extent to which bank market caps shrank in 2008. It was widely circulated in financial circles without anyone noticing the elementary error in basic geometry which meant it massively overstated the shrinkage).

Fred Wilson’s blog post cited Chris Anderson’s WSJ article of last week on The Economics of Giving It Away, which, he notes, “suggest[s] that Internet entrepreneurs are going to have to get people to step up and pay for something instead of just giving everything away for free …” Really? Is such a concept so novel?

Have we brought up an entire generation to believe that cash isn’t important? Is this the payback for all those millions of dollars spent educating a multitude of MBAs? It turns out it was all a waste of money, because all it’s done is encourage the hubris that this generation is so smart it can defy the rules of economics (as well as remain oblivious to the tenets of geometry). For a few years there, the self-appointed masters of the universe deluded themselves that they had bypassed the normal rules of finance. Now they, along with the congressional Democratic caucus, get lectured on basic economics by Steve Ballmer, of all people:

“The hard truth is this, in my opinion: The private sector of our economy has borrowed too much money, businesses and consumers alike … The bubble has burst … America really has to return to growth that’s built on innovation and productivity, rather than leverage and private debt.”

My worry is that the culture of free money has become so ingrained that everyone under thirty-something is convinced that money can simply be conjured out of thin air by making promises for the future, rather than having to be earned from actual work that delivers real-world value today.

And then, out of nowhere, we have Fred Wilson all of a sudden saying that what matters is living on current revenues rather than spending from future projected revenue. The emperor of debt is deposed without even a shirt on his back and cash comes from nowhere to usurp the throne. In an instant the conventional wisdom switches from spending tomorrow’s wealth to conserving today’s. If we are to pursue that mantra as unthinkingly as the one it replaces, then we are in for a depression as deep and unforgiving cialis dosage 40 mg as the levity and irresponsibility of the boom that preceded it.

Permalink • Print • Comment

The biggest threat to social networking: Idiots

February 6th, 2009

Posted by Larry Dignan

Warning: This is a Friday rant that’s slightly off the beaten path, but I’m having a bad social networking week.

Perhaps I’m feeling a bit antisocial, but this social networking thing has been quite annoying of late. First, there’s the Google Latitude announcement where the big benefit is in tracking friends every step (and allowing them to track you). Oh joy. Why don’t we just implant chips in our heads and get it over with?

And then there’s the 25 things meme on Facebook. Learning 25 things about your peeps was kind of fun–until everyone started doing it. Now I know 250,000 things about my friends. I’m numb. Even worse: I don’t care anymore.

But that’s only prelude to the reason why social networking has me down. Fact is that social networking sites give people a venue to whine about things that they have no business bitching about in the first place. In the real world, you’d just slap these people upside the head and get it over with.

Also seeAre drunk Facebook photos killing your job prospects?

Enter the mortgage broker’s wife on Facebook. You see, she’s complaining about the fact she can’t go to Las Vegas on her husband’s Wells Fargo junket that was just canceled over some seriously bad PR.

Well, that’s just oh so sad. And then there’s her husband, Mr. mortgage broker who posted a big ode about his bank and how it has been wronged by the press over this Las Vegas junket–the one he and his wife wanted to attend. Turns out his bank took some U.S. Treasury money and there are a few strings attached. Boo hoo.

If social networking didn’t exist these two people would just bitch and moan to themselves–and maybe a handful of others. Instead, social networking enables a lot more people to be exposed to this whining.

There is one bright side to this. All of this new media allows me to share my response to this whoa-is-me-I-can’t-go-to-Vegas-on-a-junket-tale. The response goes something like this:

“Wah. I can’t go to Vegas.” Well, give me a #@$# break, dude. You’re lucky to even be working. A) You’re a mortgage broker (evil). B) You work at a bank. If your dumb arse worked at Countrywide, IndyMac or a dozen others you’d be unemployed. The difference: Dumb #@$@# luck. You should count your blessings. As for the bailout I have two words–make that three. Tough bleeping bleep. Given that the taxpayer gave you dough–you dumbies took it–you have to deal with the strings attached–and one of them should be your salary. Is cialis dosage 20mg it just me or is it truly whacked that you benefited on commissions the entire way up on this mess (and you helped it along) and now benefit since all the idiots you gave a mortgage to are now refinancing because they couldn’t afford it in the first place.

The one upside to social networking: Defriending. Hey, perhaps it isn’t so bad after all.

Permalink • Print • Comment

February 4, 2009

Blogging

Kontain

If you've ever thought about blogging, but haven’t done it because it seems too confusing to get started, I sure hope you'll give Kontain a try! I’ve switched to it from where I was blogging before, because it's so easy to use!

To get started, you’ll need to sign up. Click on the Sign Up button to begin the registration process. Next, you’ll be asked to create a username, provide an e-mail address and create a password. Then simply check the box after reading the Terms of Use and click on the Sign Up button once more. Then just provide 5mg cialis generic them with your gender and birth date and click on Let’s Go!

You have 15 days to activate your account with the confirmation e-mail they send to the e-mail address you provided. You can start customizing your profile or adding an entry right away. Just don’t forget to activate your account at some point.

In your profile, you can add your name, location and a little bit about you. At the top of the page, you can add an entry to your blog by clicking on the Create Entry button.

That takes you to the entry page where you'll title your entry, add media (video, photos and audio) if you want and write up your entry. When you're finished, go ahead and click on the Publish Entry button and just like that, you’ve posted your first blog entry!

On the Features page, you can take a nice tour of what you can do with a blog here at Kontain. They’re working on adding more features for the future as well. It's a very smooth blogging setup that's so easy to use, it's definitely worth giving a try.

Also, if you don’t like it, you can always go to your account settings and delete your account with the Delete Account option. I think you’ll love this Web site. I know I do!

http://www.kontain.com/#home

Permalink • Print • Comment

Restricting Unwanted Web Sites

Everyone knows there are a ton of Web sites out there that can be harmful to your computer, unsafe for your children and just simply unwanted by everyone. I'm sure all of you have come across a site you wish you would have never seen. People are always asking me how they can filter their Internet access so that those sites are blocked from their computer. While there are many ways to do that, from installing programs to using filters provided by your ISP, there's one way I came across a couple of days ago that makes more sense and it's so simple to set up. It doesn't require you to install any software and it can be put in place by simply following the steps on the Web site. You'll be up and running in just a few short minutes. Let's check it out!

The filtering option I'm talking about is called OpenDNS. It's a company that provides free filtered DNS services to residential and educational users. So that you'll have a better understanding of how it all works, I'll need to explain what DNS is.

DNS stands for Domain Name Resolution. When you visit a Web site, you type the name of the site into your Web browser. That name is called the domain name. For WorldStart, our domain name is worldstart.com. Now, the part most people don't know is that without DNS, you would never even get to worldstart.com. Computers and the Internet don't understand names. Instead, they understand IP addresses. When you tell your Web browser to go to www.worldstart.com, it has to figure out what the IP address of worldstart.com is. And that's when DNS comes into play. When you tell your Web browser to go to www.worldstart.com, it asks a DNS server to tell it what the IP address of worldstart.com is. The DNS then tells the computer the IP address of WorldStart is 207.126.59.171 (for example). After your computer gets that information, it then connects to 207.126.59.171 and the WorldStart homepage appears.

I know that may seem a bit confusing, but here's the point I'm trying to make: if the DNS your computer connects to knows a list of bad Web sites, it can restrict your computer from going to them. That's exactly what OpenDNS does. If you configure your computer to use OpenDNS for its DNS services, the OpenDNS servers will is cialis over the counter know which Web sites your computer is trying to reach. It can then block the bad ones.

All in all, if you want to filter your Web use and block unwanted and potentially bad Web sites, try OpenDNS. It's very easy to use, even if the explanation is complicated. I promise! You can check it all out right here. Until next time, stay safe out there, my friends!

Permalink • Print • Comment
« Previous PageNext Page »
Made with WordPress and a search engine optimized WordPress theme • Sky Gold skin by Denis de Bernardy