Instant Preview in Mozilla Browsers

I’ve noticed that the Preview code that both the WordPress Dash, and my Comment Preview uses (okay, I stole it from there!) is really slow - read as unusable in Instant Preview mode - under Mozilla browsers (on Mac, at least). There is a noticeable lag between typing and the characters appearing on the screen, in the Text Box, let alone in the Preview Box. I wonder if it would be possible to rewrite the script so that it wasn’t onkeyup, but every 5 seconds, or something like that. Or possibly make it so it doesn’t redraw the whole lot? Perhaps the best would be that it only redraws when keys have been pressed, but not in the last 3 seconds. I’m not sure if any of these can actually be done!

Gravatar Weirdness

I’ve come across a couple of issues with Gravatars recently: they don’t always show. And the weird bit is if I play around with the &size=xx part, different gravatars work. And the ones that did display no longer do…

<img src="http://www.gravatar.com/avatar.php?gravatar_id=ff3502050b3b1b00cb6c810d5c41ffc9&size=48"alt="" /><img src="http://www.gravatar.com/avatar.php?gravatar_id=ff3502050b3b1b00cb6c810d5c41ffc9&size=49"alt="" />
<img src="http://www.gravatar.com/avatar.php?gravatar_id=833bfbcc9940cfcf0af6def751c23b05&size=34" alt="" /><img src="http://www.gravatar.com/avatar.php?gravatar_id=833bfbcc9940cfcf0af6def751c23b05&size=39" alt="" />
<img src="http://www.gravatar.com/avatar.php?gravatar_id=faee9dd9ddfedbbc82b61aaa6ee1e1fb&size=50" alt="" /><img src="http://www.gravatar.com/avatar.php?gravatar_id=faee9dd9ddfedbbc82b61aaa6ee1e1fb&size=45" alt="" />

Strange. And it’s not limited to my site, either, I noticed it on the Official Gravatar Forums. I assume that means it might be fixed soon.

Edit: That’s crap. The images in the bottom two pairs used to have one that worked, now they both appear grey!

**Edit 2: **Now both of the middle ones, and one of the bottom ones are all working!

Comment Preview Fix

One thing is missing from my Comment Preview script: when you click on the link button you get a window to enter the link URI, I need to implement the equivalent for the acronym/abbr. Actually, I can probably autofill most of the acronyms. That would be cool. And maybe get the code added back into the one that is used for the WordPress Dash.

Gravatars not loading

I’ve noticed some commenters Gravatars are not loading, including mine. Some of them are, but I don’t know why. I haven’t been able to log into Gravatar.com to see what’s going on. Oh, and Jake, I think there’s a problem with document.commentform on your site, and I cannot submit a comment.

No Posts = No Visits

I have noticed that my post hit count dropped off dramatically in the past week, when not posting any new entries. Hint for new players: post often if you want people to keep reading…

Using CSS to replace tables.

Using some classy CSS, you can make text flow nicely around images, rather than having to set stuff up using tables, and demonstrated in this post. Basically, you just put the following into your CSS file:

1
2
3
4
5
6
7
    .left {
        float:left;
    }
    
    .right {
        float:right;
    }

And then wrap the image in <div class='left'> ... </div> tags (or class='right' to make it sit on the right of the text). You can use margin:15 0 15 25; for example to put a margin of 15 on the top, 0 on the right, 15 on the bottom and 25 on the left, so that the text does not come right up against the image. I also change some text properties in my CSS, so I can include a caption inside the <div class='left/right'> ... </div> tags and it will be italic, centred and so on. I’ll leave these as an exercise to the reader. If you just use the code above, you can also use this whenever you have post-links, or page-links, so that one always appears on the left, and the other on the right. I have now removed every table from the site, except the one on the page this article links to.

Page Visit Dropoff

I don’t obsess over my referers, much. It’s interesting to see what pages people have visited, and where they have come from, but I don’t write the stuff on this site because I’m trying to make myself heard, or popular. It’s more of: “Here’s some information I’ve come across: if someone else is searching for it and I can help them, that’s all good!” Having said that, I have had days in the last month or so where I have had over 400 page visits. Many of those are to the one post I wrote on Sudoku, ages ago, but they still keep coming. Even though I don’t actually provide much information in that post! I even had a day, a month ago, that had 690 referers, although a big chunk of them were actually some spider, as they were all DIRECT referers, and all seemed to be accessing weird URLs. More recently, I’ve discovered the Gvisit page, and have been able to see my most recent visitors locations, on a Google Map, which is very cool. I’ve even thought of making a category link, a home page link, and so on. But that seems like it might be too much work. Today, I noticed I only had 24 referers at around 2:30 (ACST: +0930), a time I usually number around 150. I thought, “Hey, there’s something weird going on here!”, and looked at the monthly view. 125 yesterday, and 174 the previous. Prior to that, each day had around 3-400 referers. I’m not sure why my traffic has suddenly halved: my Google Page Rank is a fair 5/10 (Boing Boing has a Page Rank of 8, Blogsome 6)

GVisit

Now this is cool. Go to Gvisit and you can register, and get a one-line JavaScript that can be put onto a web page, and their server will be able to tell you where your visitors are coming from! My last 5 visitors came from:

  • New York
  • Bern
  • Seattle, Washington
  • Melbourne, Victoria
  • Adelaide, South Australia

I’m guessing the last one was me ;) The free service will only track the last 20 visitors, the paid-for one will do up to 100. (Thanks to Jake for this one)

Limiting Adsense to certain text

I use Adsense as a way to try and make a little extra cash off my site: I’m not trying to make it a real business or anything like that, I just figure that I may as well do that. I haven’t seen a cheque from Google yet, but it’s only a fairly low traffic site (2-300 hits per day, and most of them on a few posts, including one Sudoku post I wrote ages ago. Still gets more comments than all other posts combined too…). Anyway, Adsense seems to think my site is all about blogging, when it’s really not. I have written several blogging related posts recently, but there is more depth to my site than that. Occasionally I get AppleScript Ads, and sometimes some Psychic Ads (!?). What I think is happening is that many of the posts are short, and Google indexes all of the page, but it looks like most of the page is about blogging, due to the text and links in the Sidebar. I’d like to be able to tell Google that the text that the Google Ad should be about is the stuff inside the <div id="content"> -- </div> tags. Then, Ads would actually reflect what I’m posting about. Instead of always being Ads for the same few blogging companies (especially Square Space…).

Other Hosts

I’m thinking about leaving Blogsome: I’ve been pretty happy with their hosting solution, and bugs tend to eventually get fixed, but there are two issues I can’t continue to live without:

  1. Posts posted via XMLRPC don’t have categories set.
  2. Posts posted via XMLRPC have quotes and double quotes escaped, breaking stuff.

I’ve got an account set up on http://schinckel.globbo.org. I’ll probably continue to post here until I get the template/theme set up how I want, and then move everything over.