Temporary Internet files are a cache of Web page content that's stored on your hard disk, enabling you to quickly view Web pages you've already seen, rather than have to wait when your computer downloads all the content of a Web page each time you want to see it. If your computer ascertains that you already have the Web page in the temporary Internet files folder and the Web page hasn't been updated since then, it gives you the version that's already in the folder. On the one hand, it's a convenience, but on the other hand, at some point you might find that your hard drive is getting pretty full, in the same way that you keep throwing stuff into your garage until there's no more room left for the car. In that case, it's time to clean up and declutter. Depending on which browser you use (Microsoft Internet Explorer, Mozilla Firefox, Google Chrome, Safari, Opera, etc.), you have a different procedure for emptying your cache, and a bonus is that your browser will operate more efficiently, as well. If you have Windows 7 or Windows Vista, you'll find your temporary Internet files in your C drive. Be aware that even when you delete the contents of this folder, there are still traces left of the sites you've visited. If you really want to clean everything out, you may need more specific software to do a thorough job. You also have the option to leave some sites in your temporary Internet files folder, either because you plan on accessing these sites frequently or because it looks awfully suspicious to have absolutely nothing in this folder.
Please beware that as of 18th November the W3C is no longer actively working on the Web SQL Database specification. The Web SQL database API isn’t actually part of the HTML5 specification, but it is part of the suite of specifications that allows us developers to build fully fledged web applications, so it’s about time we dig in and check it out. What’s in the box? If you haven’t guessed from the overly verbose specification title, Web SQL Databases is a spec that brings SQL to the client side. If you have a back-end developer’s background, then you’ll probably be familiar with SQL and happy as a pig in muck. If not, you might want to learn some SQL before you start hacking around, Google’s your friend here. The specification is based around SQLite (3.1.19), but having come from MySQL myself, it’s all pretty much the same (sorry for the sweeping statement!). For an example of Web SQL Databases working, have a look at the Twitter HTML5 chatter demo I put together.
Support is a little patchy at the moment. Only Webkit (Safari, SafariMobile and Chrome) and Opera 10.50 (ATOW alpha on Mac) support web databases. Fellow Doctor Bruce Lawson has told me that Firefox are holding off as they feel there’s a better implementation than SQLite (though I hope it’s similar, whatever they pick). Either way, I’d definitely recommend checking out the SQLite documentation for the functions that are available. Because of this patchy support and the simple fact that Webkit had implemented the database spec some time ago, the spec on the W3C is now slightly ahead of the implementations in Safari, while Webkit is still catching up. On the other hand, since Opera has only just added support, it’s closer to the spec (I’ll mention the differences as we go along). Nonetheless, it’s fun to play with, so let’s get playing! If you try to open a database that doesn’t exist, the API will create it on the fly for you.
You also don’t have to worry about closing databases. I’ve passed four arguments to the openDatabase method. The creation callback will be called if the database is being created. Without this feature, however, the databases are still being created on the fly and correctly versioned. The return value from openDatabase contains the transaction methods, so we’ll need to capture this to be able to perform SQL queries. From the tests I’ve run, only Safari prompts the user if you try to create a database over the size of the default database size, 5MB. The prompt is shown the image below, asking whether you want to grant the database permission to scale up to the next size of database - 5, 10, 50, 100 and 500MB. Opera, on the other hand, builds the database without complaining, which I expect might change later as it’s still in alpha. I could be wrong, but everything I’ve tested so far says that versioning in SQL databases is borked.
|