Thursday, 20 October 2011

How to use cache-manifest for localstorage

So, you want your website to continue working on someone's laptop, when they're on a train and going through a tunnel.

Here is a technique for doing just that.

First create a .htaccess file for your site and add to it the following line:
AddType text/cache-manifest    .manifest

Next, create a file called cache.manifest. In this file, add the lines:
CACHE MANIFEST
index.html

Continue to add entries for any file you wish to be cached such as additional pages, images, scripts, stylesheets etc.

Now let's create the index.html file which will be cached:
<!DOCTYPE html>
<html manifest=”cache.manifest”>
<head>
<title>Cached Page</title>
</head>
<body>
My cached page.
</body>
</html>

There. Wasn't too difficult was it.

Wednesday, 19 October 2011

I was forced to find an IE Tester

First post in a long time. I've been very busy.

Normally, by keeping to W3C standards, I can develop a site and then do some tweaks for IE at the end. Recently developed an application in which I tested for IE along the way. Or so I thought. I was in fact, testing in IE8. Not good enough. The application came out a total mess in IE7. This was one particular customers IT Department browser of choice. This seems like a ramble but I'm getting to the point.

I then discovered IE Tester at http://www.my-debugbar.com/wiki/IETester/HomePage. This is an excellent tool if you need to view your work in various versions of IE without messing up your existing install. It works stand-alone and also happily access pages delivered by your localhost.

Well done DebugBar!