My blog now uses permanent URLs
If you're not geekish, you probably won't find this interesting, and if you're über-geekish, you'll probably think I'm slow, but otherwise there's a chance you'll find it interesting that I've set up permanent URLs for my blog pages. I'd come across an article some time ago on alistapart.com that explains why it's important to have permanent URLs, but I'd never gotten around to changing my site. This week I came across another article (both articles are a few years old, but hey, I already said I was slow) that suggested a slightly different way of implementing permanent URLs.
What kind of URLs did it use before?
In case you're wondering, my blog's non-permanent URLs used a querystring to tell my PHP script what month to display. These URLs would be something like /blog/index.php?month=200410. Bill Humphries, in the first article I read, points out that such URLs don't get indexed by some search engines (although Google has always indexed my blog despite that) and that such URLs make it apparent what kind of architecture the site is on (I already told you, but the ".php" suffix tells you I'm using PHP scripts).
What's a permanent URL?
The new permanent URLs for this blog don't use a query string but use the month as the last part of the URL. For example, this month's permanent URL is /blog/2004-10. Humphries explains what to put in the .htaccess file to transform "/blog/2004-10" to "/blog/index.php?month=200410". The lines I used are:
RewriteRule ^blog/(200[2-9])/([0-1][0-9])(/)?$ /blog/$1-$2 [NC,R]
RewriteRule ^blog/(200[2-9])-([0-1][0-9])(/)?$ /blog/index.php [NC]
If that makes any sense to you, you'll notice that you could actually get to this month's blog with the URL /blog/2004/10/ (with or without the trailing slash). If you use slashes to separate the year from the month, though, your browser will get redirected (that's what the [R] option to RewriteRule does) and display the URL with a hyphen. (Before I did that, the pictures didn't show because the server thought the page was one directory level deeper, probably something I could fix a better way, but using the hyphen avoided that.)
You may notice that my .htaccess statements don't actually turn the permanent URL into a URL with a querystring. That's because Till Quack in the second article suggests having the PHP script do the work of parsing the URL instead of doing all the work in .htaccess, and that appealed to me. The PHP script has to deal with validating dates anyway. I did set up my .htaccess so that it doesn't bother to redirect for years before 2002, which is when I started blogging, but then my PHP script makes sure that the requested date has blog entries, redirecting to my 404 error page if not.
Why does it matter?
What made me look at all this again is that until now my current blog page has always been just "index.php". Google does index my site, and I do get some visitors, but it takes a while after a month ends before Google notices that the content that used to be on the main "index.php" page can be accessed only through a "index.php?month=x" page. That meant that, for example, at the beginning of September people searching for items on Chris Harbinson (who, by the way, loudly proclaims [protesting too much?] that he is not gay) would be directed to "index.php" instead of "index.php?month=200408", the page for August on which he is mentioned. Now, as you'll notice if you look at the top of your screen, the current month's blog is referred to by its fancy new permanent URL, which doesn't change at the end of the month, making Google have to do less work and making sure that visitors to the blog get the page they searched for. Woo hoo!
I switched my default browser from Microsoft Internet Explorer to Mozilla Firefox the other day. I'm sticking with Firefox, but there are a couple features I miss about IE.
Much as web designers rant, however justifably, about how IE violates web standards, most of those complaints are about design, not user interface. Web developers have to use workarounds and take additional steps not so much to make their sites functional in all browsers but more to make their sites display the same for all browsers. Now you could argue that functionality is dependent on display, such as in the case of Eric Meyer's cool pure CSS menus, which simply don't work in IE, but for the most part the reason IE's rule breaking annoys so many designers is aesthetics.
IE's rule breaking obviously isn't of much concern to its many users. Sure, a few are switching because of concerns about IE's security. However, the vast majority of web surfers go about their business quite happily with IE. Some might call these people naïve, but surely a few count as power users who simply like some IE features.
And that's where I come to one feature I've found myself really missing just in a few days. I'm not talking about having to learn a new access key for the menu containing my bookmarks but rather a feature that impedes my work. Firefox's find text feature, though nifty (it finds as you type), is not as functional as that in IE because Firefox doesn't search inside <TEXTAREA> input boxes on forms. IE's does.
Why does that matter, you may ask. Well, this very blog, though not maintained with a blogging tool, is updated via a database and web forms. After I
type this entry up, I look at my blog in a browser, and I notice some mistake that I want to edit (say I misspelled "TEXTAREA" as "TXETAREA"). I go back
to the page with my form, and I could scroll down in the <TEXTAREA> until I see the word so I can fix it, or, in IE, I can type <CTRL>-F, type "TXETAREA" and hit <ENTER>. Boom, the word is highlighted, and I type my correction over it. In Firefox, I type /, type "TX" and it beeps at me to say there's no occurrence of "TX" on my page. Well, yes, there is, it's just inside the <TEXTAREA>.
Minor problem? Yes. Easy enough to work around? Yes. But features that help power users are important, which is why, for example, Firefox goes beyond IE's <CTRL>-<ENTER> for automatically adding the "www" and ".com" to a domain typed in the address bar to adding additional keyboard shortcuts for appending ".net" (<SHIFT>-<ENTER>) and ".org" (<CTRL>-<SHIFT>-<ENTER>). Your grandmother doesn't care about typing the URLs of non-profit organizations more quickly, but I do.
Copying and pasting, IE vs. Firefox
Perhaps a more important problem occurs when copying information from a browser window and pasting it into a Microsoft Office product such as Word or Excel. If I am using IE when I copy a table from a web site and paste it into an Excel worksheet, all the information is transferred nicely into individual cells, and all the formatting is the same. If I use Firefox, all the table's data ends up in one cell in Excel. Not user friendly at all. Should Mozilla care about
You can use any table, but here
's the one I used.
Sure, you have to resize some columns,
but the data is still tabular.
You might as well retype all the data.
(Pasting as text works somewhat better.)
supporting the patriarchy integration with standard business productivity products? They should if they want business people to use Firefox.
However, Mozilla does a lot of things better than Microsoft, and one thing is having a site, Bugzilla, on which users can report bugs or make feature requests. (Click here to vote for Mozilla fixing the copy/paste to Excel bug.) Microsoft may also have one (I didn't search for it, though, and didn't have to search for Mozilla's since they make its existence so clear), but Mozilla, as the underdog, has more reason to listen to its users. That's just one more reason to use Firefox instead of IE.
I've had the Mozilla Firefox web browser installed on my computer for some time but had stubbornly continued to use Microsoft Internet Explorer 6.0 for the most part, starting Firefox only once in while to see how my site looked in it. Today however I've finally made the switch to using Firefox as my default web browser.
The thing that clenched it for me was that for the past week or so IE has been locking up sporadically. Before you say it was something wrong with my computer and not IE let me tell you that it also happened at school too. And near as I can tell it wasn't just with one site, although there are of course a set of sites I visit regularly. It wasn't enough of a problem to keep me from doing what I wanted to do, but it was annoying, and today I decided it was annoying enough to make me switch.
However, Firefox also has some nice features not in IE. I really like the tabbed browsing instead of having multiple windows, although if you prefer multiple windows, Firefox of course lets you do that too. I like Firefox's built-in pop-up blocking (yes, I know that SP2 is supposed to add that to IE), which works better than the free version of Pop-Up Stopper I'd been using. Firefox's find feature is much more nifty than that of IE (speaking of which, doing a find for "it's" in IE always seems to make IE crash, at least for me). I'm sure I'll discover other nice features.
One last geeky thing is that Firefox's use of <ALT>-B for the "Bookmarks" menu as opposed to <ALT>-A for the "Favorites" menu in IE was driving me crazy (since I'm a big keyboard shortcut user), but I found a terrific page that explains step-by-step how to find and modify the browser.dtd file to change the names and accesskeys of menu items, so now my Firefox has a "Favorites" menu instead of a "Bookmarks" menu, along with the IE-compatible "Add favorite" and "Organize favorites" items. Yeah, I could have just gotten used to Firefox's key choices, but it was more fun to figure out how to change them.
|I've automated my links page to make it easier to sort through the sites by type and by frequency of my visits. I'll add more links in the coming days, not so much for you but so that I can easily find my favorite sites when I'm away from my computer.|
|One of the benefits of running this site on a web host instead of just putting it on my ISP's server is that I have access to the web logs, giving me some information about my site's visitors and what pages they're looking at. (Earthlink, my ISP, offers Urchin, which reports basic info such as number of visitors and number of hits. Urchin also has lots of enticing links promising info such as referrals and browser types, but these links all lead to a page asking you to upgrade to Earthlink's web hosting package. While Earthlink is fine as an ISP, I wouldn't recommend them as a web host.)
At any rate, what I've found is that by far the most popular page on my web site is my blog from October 2003. I've also found that the reason for this is Google's image search. Last month I had 541 hits from it, mainly from images.google.com but also from images.google.ca, images.google.com.au, images.google.fr and from several other countries. Of those 541 hits, 386 of them were for the October 2003 blog page. August isn't even over, and I've had 389 hits from Google's image search, of which 243 were for the October 2003 page.
What were these people searching for, you may ask. Nudity! of course. There were some other search entries such as "brown," but most people want to see nude pictures, and Google Images directs them to my site, which really isn't the best place on the net to find nude pictures. There is a little bit of nudity on the October 2003 page, a butt shot of a drunken guy in a limo, but his hands cover most of his buttocks and I used PhotoShop to blur the bit between them. If I were using Google to find something to get myself excited and that was the best it could come up with, I'd be disappointed.
My bandwidth usage was also markedly higher for these two months, although, luckily, not so high as to cost me any extra money. Nevertheless I did what I should have done when I first set up my site, which was to set up hotlink protection. Of course I don't mind people looking at my pictures, but I'd rather they see them in context. However, Google's image search still shows the whole page if someone clicks on one of the thumbnails returned by Google. I decided to hone my PHP skills a bit and came up with a way to redirect visitors from images.google.* landing on my October 2003 page to a special message.
You might also ask why I've posted links in this entry to Earthlink, AffordableHost and Google but not to the October 2003 page that all this is about. Well I figured that page gets enough hits already. If you really want to see Todd's butt and read about why he showed it, use the month navigation links on this page.