Web Page Speed

Posted on December 17th, 2009 in PHP, Search Engines, Webmastering by Russ

With chatter today about website speed, here’s a quick test to see how long a webpage takes to download.

Keep in mind that this should be run at some interval with an average taken. Server load and speed should be taken into effect.

$ time wget –quiet –delete-after –page-requisites http://www.gmail.com

An example output is:
real 0m0.421s
user 0m0.000s
sys 0m0.012s

“time” gives you how much time something took; the command after the time command. You want the “real” number.
“wget” is a great tool for downloading stuff from the web. The –page-requisites flag gets the CSS(link) (Cascading Style Sheets), JS, images and other things necessary for the page to be displayed. The other options (quiet, delete after) are just there to clean up the output.

This also doesn’t take into account how much time a browser might take arranging the pieces into a pie. A bunch of nested tables will cause the client to slow down. Not specifying image height and width will cause browsers to slow down. A slow computer … well, you get the idea. Run this and take an average of the REAL value and you should have a pretty good idea of how slow your site is.

Note
If you’re plugging this into a php script, keep in mind that “time” is outputting that into the STDERR stream.

Ultra DNS: adding a SPF record

Posted on December 16th, 2009 in PHP by Russ

Just a quickie note:
Had to add a SPF record to a domain where the DNS is at ultradns.com.

Skim down to the “txt” areas, and add a text one like this, with your domain as the first textbox.

This one is because this particular client uses google mail for their domain.

v=spf1 include:aspmx.googlemail.com ~all

This one is a seriously generic and just allows any server that’s listed as an MX for the domain.

v=spf1 mx ~all

Trying Git

Posted on December 15th, 2009 in PHP, Webmastering, system administration by Russ

The ominously named “git” is a rather dull knife in my toolbox. I’m used to subversion (svn). I use svn routinely for my own work, as a backup. So I modify some files, do a svn commit and then push my files to where ever they need to go.

Git’s another beast. Because it’s an distributed system, doing a “git commit” doesn’t send my files to the backup. I have to do a “git commit;git push” for that. I’m liking the .gitignore file (compared to svn propedit syntaxes). And I’m liking the easiness of branching. I’ve got a couple of projects that are pretty much duplicates of one another with different filling. Like making a pie, but this one is apple, that one is cherry. With subversion, it feels a lot more like those projects are full of stuff. But git feels leaner. Which is good, right?