In this session, a member asks if gravatars slow down a site. We discuss the reasons for this as well as the alternatives that can make your site load faster.
Rick: So now, I’m going to unmute Sandy’s microphone. Good morning, Sandy.
Hi, how are you?
Rick: I’m doing great. How are you?
Rick: Okay so you have a couple of questions. The first one was about the gravatar or using gravatars?
Yes. I had heard that the gravatar is a big (00.31.5) site resources and that maybe you want to reconsider using that and just do something different.
Rick: Yeah well you know, the single most… slowest part of loading my homepage is loading these gravatar images from the testimonials. And there are 2 reasons for that. One of them is that it relies on an outside site to respond to requests and the 2nd one is that that request happens… 1, 2, 3, 4, 5, 6, 7, 8, 9 times. And so… and if you click over to Read More…you know, that’s what takes all the time for this to load is the time for these requests to be processed even in the case where the you know, this image is already in my browser cache because all of these images are in my browser cache so it doesn’t actually have to download the images anymore. Although the first time you come to this, you will end up you know, having to download each of these images. They are small but nevertheless, you have this request that goes out for each one of these, each instance of these gravatar images. The same thing happens then when you are on the blog and you know, somebody has commented on this. Let’s see, I’m going to say that I probably have comments on this one. And so, each one of the comments on this then waits for or relies on the you know, this little gravatar image to come up. Now… and what I do is I substitute in the case where a gravatar you know, this person doesn’t have a gravatar image then I have it set so it substitutes my little Groucho Marx face instead.
So yeah, it does take time. Now the problem with getting rid of it is that it’s all part of the process of you know, personalizing your interaction with the people on your site. And so, if you remove it, you are removing that personal element from you site and I mean you know, you’re the best judge of that. What do you think about that?
Sandy: Well, I’m great with everything you said. I just worry that you know, everyone is so sensitive to Google today and their algorithm. And Google really wants to see, in my opinion and I worry that if it interferes with the feed as the site matures. But I guess it can be considered as something that we have to do anyway so we just grin and bear it kind of thing. I just didn’t know if there was a way of getting around it.
Rick: Well, my plan to get around it is to take all of those images and put them into an image sprite and then instead of using gravatar for… especially my homepage, you know. I want my homepage to load faster than it does. And instead of using gravatars or the homepage, each one of these things will be a single image. I mean, each of these would be an image on an image sprite and that image sprite would reside on my site and not rely on other people’s site to display it. And I will probably… and so you know, in order to make that work, you know, what I’m going to have to do… right now, these… this system changes every time. Every time you hit refresh, you know, a new set of testimonials show up. And what I’ll have to do in order to do what I’m suggesting is I’ll have to essentially fake the testimonial widget here with something that is hardcoded that does not rotate. And then I can you know, put all my images together in a single sprite, have it to be… you know, and I would probably do that with these 2 images and this image and each of these images and you know, put all of those images together in a single image sprite for this page so that it only gets loaded once and you know, speed my site up that way. But that, I think, you can either choose not to use gravatars which, of course, will speed the thing up or you can choose to go to extraordinary means which I’m talking about doing which is you know, eliminate some of its interactivity by hardcoding stuff.
And so there are a bunch of things like that that make my site slow and that I wish you know, I could get a handle on and you know, gravatar is just one part of that. So I’m quite concerned about that myself but it doesn’t seem to be anything I can do about it so…