In the punchline of the most recent XKCD, creator Randall Munroe says that he avoids falling into a procrastinatory clicktrance by setting "simple 30-second delay I had to wait through, in which I couldn't do anything else, before any new page or chat client would load (and only allowed one to run at once). The urge to check all those sites magically vanished–and my 'productive' computer use was unaffected."
Now Randall reveals the simple tactic he uses to insert this productivity-saving delay:
I made it a rule that as soon as I finished any task, or got bored with it, I had to power off my computer.
I could turn it back on right away–this wasn't about trying to use the computer less. The rule was just that the moment I finished (or lost interest in) the thing I was doing, and felt like checking Google News et. al., before I had time to think too much, I'd start the shutdown process. There was no struggle of willpower; I knew that after I hit the button, I could decide to do anything I wanted. But if I decided to look at a website, I'd have to wait through the startup, and once I was done, I'd have to turn it off again before doing anything else. (This works best if your ongoing activities are persistent online–for example, all my IRC chat is through irssi running in screen, so turning off my laptop doesn't make me sign out.)