Coding with Jesse

5 things every web site can learn from blogs

Blogs are here to stay. However, I don't believe every web site needs to have a blog to benefit from the way blogs have changed the Internet. Here are five things blogs have taught us that we can use to improve all web sites:

  1. Update regularly

    Many web pages have some kind of "News" or "What's New" section. Most of them never seem to change. Blogs essentially took this section and made it the centre of the entire web site. Things are always changing and events are happening. The best part of the web is how up-to-date it can be. If something important is happening, and there is nothing about it on your web site, your visitors won't trust your web site as a source of information.

  2. Let visitors subscribe

    Blogs didn't invent subscriptions, but they've certainly proven they work. Long outdated are the phrases "Bookmark this site", "Under Construction" and "Check back soon". Every web site is changing and being updated. Visitors don't have the time to check back. You need to offer a way for them to subscribe. RSS feeds are certainly the new standard for subscriptions, though E-mail updates are still relevant for those who don't use RSS.

  3. Speak with a human voice

    Blogs aren't written in buzzword-filled meaningless marketing speak. They're written in the same language people use to talk to each other. The kind of language that people actually want to read. By changing the language of web sites, you not only make your web site more friendly, you make it easier to understand. If you really have something worth saying, be direct and clear about it. If not, why would you bother writing anything at all?

  4. Get personal

    Blogs don't hide the people behind the web site. In fact, that may be their strongest attraction. The Internet is changing the voice of companies whether they embrace it or not. For example, Robert Scoble's blog has become the voice of Microsoft. His blog is honest, admitting where Microsoft fails, where it needs to improve, and what its true motives are. It's time for the people behind web sites to come out and tell their stories.

  5. Let visitors discuss

    People need a chance to respond and add to things they read on the Internet. Most blogs give visitors a chance to discuss in comments and trackbacks. Where comments and trackbacks aren't appropriate, wikis and forums fill in the void. If your web site doesn't give a chance for visitors to contribute and share feedback (whether it's positive or negative), they will do this on their own blogs. Offering a place for the visitors of your site to come together and share feedback builds community, trust, and lets your site evolve in response to what people want.

Published on January 14th, 2006. © Jesse Skinner

JavaScript Speed Detection

This question came up on the css-discuss mailing list today (asked by Howard 'duke' Holtz):

I would like to include a Flash header on the homepage, but switch to a standard gif header for viewers with slow connections. I was hoping that there is a way to maybe have two “includes”, and use one or the other – but first I need some kind of 'conditional switch' or 'logic switch'.

This is a great question. I don't think any website has addressed this issue through scripting. We've all seen websites that start off with "Click here for Flash, Click here for slow connections" pages. But what about using JavaScript to test the speed of a connection?

I started experimenting with JavaScript and came up with a fairly simple, clean solution. It is all based on the onload event of an image. What we will do is time how long it takes to load an image. If the time is below our threshold for "high speed", we will display the flash content. Otherwise, we will do nothing and display the default content.

<script type="text/javascript">
var start = (new Date()).getTime();
var THRESHOLD = 2500; // a number we will calculate below

function speedTest() {
    var duration = (new Date()).getTime() - start;
    if (duration < THRESHOLD) {
        // fast connection (display flash)
    } else {
        // slow connection (do nothing?)
    }
}
</script>
<img src="some-image.jpg" onload="speedTest()">

The onload event can go on any image on the page, preferably the largest image to give us a better estimate. Let's say we only want users downloading faster than 10k/s to get the flash code. We check the size of our some-image.jpg, and see that it is 25kb. We can easily calculate the THRESHOLD value like so: (25kb) / (10k/s) = 2.5s. Converting this to milliseconds gives us 2500, so this is what we will use for the THRESHOLD.

If you're using Bobby VanDerSluis' Unobtrusive Flash Objects 2.0, you can put the UFO code to load Flash in the block for users with a fast connection. You can then do nothing for users with a slow connection and just let them see the default content on the page.

I have thought of one problem with this solution: if the image is in the user's cache, the number will be very low. This will cause the flash to be loaded if they come back later. To avoid this, you could add a no-cache rule on the webserver for this image. Or, instead of using an image on the page, you could load an image in the background with JavaScript using a random URL like so:

var testImage = new Image();
testImage.onload = speedTest;
testImage.src = "some-image.jpg?random=" + Math.random();

Of course, if you are using PHP or another scripting language on the server, you could generate the random URL a number of different ways. This fix also has the downside that the visitor must download this extra image every time. You'll have to balance these factors in your solution to come up with one that fits.

Good luck! I'd love to hear your comments, suggestions and questions about this. Let me know how it goes on your own web sites!

Published on December 14th, 2005. © Jesse Skinner

No More Ads

As you may have noticed, there are no longer ads on this site. I decided to get rid of them for a few reasons. First, they were just a big eye sore, as far as I was concerned. Second, since I don't have a whole lot of traffic (yet??), I was only making a few cents a week. I weighed the two, and decided that it just wasn't worth it. Once my traffic gets to be higher, I might put them back. But for now, you can enjoy the site in it's pure form.

I actually left the Chitika ads on the tools pages. I get quite a bit of traffic through there, and none of the visitors are regular, repeat visitors, so I'm not worried about the eyesore factor. Plus, I'm desperately waiting to earn the minimum payment amount so I can leave Chitika behind. I've been really disappointed with Chitika. I think this is because none of my websites are really geared to people who are interested in buying anything specific.

I've seen websites and blogs around that are just chock full of ads. And, I suspect, these tend to be websites that people just don't go to. I suspect there may even be a connection here, perhaps the ads tend to turn people away. Although it would be nice to be able to have the website pay for itself, that's certainly not why I made this site. It's all about balance. And since I have a day job, I can certainly afford to make this site look a bit nicer for all of you. Maybe some of you with websites can do the same for me? ;)

Published on December 10th, 2005. © Jesse Skinner

Why Not You?

Steve Pavlina just wrote a wonderful piece, "Why Not You?". Like I wrote about a few days ago, I strongly feel that everyone is capable of doing anything. The problem is, nobody seems to know it. Steve addresses this, asking "Why not you" go out and fix the problems in the world that you see.

"It's too big," you say? It's supposed to be too big. Tackling challenges that are too big for you is what makes you grow as a human being. Why do you think this problem keeps coming up in your life, staring you in the face? Do you think you're supposed to ignore it and hide from it and wait for someone else to solve it for you? If you notice it, you own it.

I believe the Internet has made this even easier. It's easy to send off an email and talk to anyone, especially the "right" people. It's easy to put up a website to get support from people across the world. It's easy to find other people that share your goals. All this without leaving your bedroom!

So, think about this. Is there anything that you want changed in the world? If so, go change it!

P.S. Don't get Steve any widgets for Christmas!

Published on December 9th, 2005. © Jesse Skinner

Inspiration from Television?

John at Success Begins Today just mentioned that he has put up some new inspirational articles. He writes:

Most people receive inspiration from people they see on television or hear on the radio.

I think this is sad..but probably true. I can't help but imagine millions of people sitting at home, watching TV, thinking "if only I could be rich and famous like that person". Personally, and lately, I get all my inspiration from reading stuff on the Internet. Now, I'm not being stuck up about different types of media. I realise I'm in the rare minority that rarely watches television and spends all my time on the Internet. And I think inspiration is wonderful no matter where it is found.

Nonetheless, television just represents a different world to me. I can't remember the last time I was inspired by people on television or radio. For some reason the phonyness of "celebrities" really turns me off; I never want to be a "celebrity". I have no interest in getting my 15 minutes of fame. And I don't feel the ability to entertain is some incredibly rare talent that should be held high above all other talents and abilities.

I like to see people who believe in a purpose or have seemingly impossible goals, and have focused on those goals over a long enough time that they have succeeded in one form or another. I like to read about how they started off the same as all of us, yet broke through and achieved great things. Sure, these people end up on television sometimes. Like John's example, sports heros can certainly be inspirational. But they are rarely referered to as "celebrities". The people that the television world chooses to "celebrate" are not the same ones I would choose to.

If you disagree, or if you feel I'm missing something, I'd love to hear your comments.

[Update: I've been mulling this over since I wrote the response, trying to determine what it is that frustrates me. I've decided I'm frustrated at the artificial divide that television seems to create. I am frustrated that millions of people think they could never achieve the things they see on tv; that only "experts" or "geniuses" can accomplish such things. And as a result, they don't even try.

I find the most inspiration when I'm reminded that everyone is capable of everything. I believe it's just a matter of attitude, including integrity, passion, devotion.

As John later mentioned, realism is very important. Both to keep plans realistic, but also being realistic with what is possible. I think most people put unrealistic limitations on their lives.]

Published on December 6th, 2005. © Jesse Skinner
<< older posts newer posts >> All posts