Why you should validate

Opera displaying invalid html document

In writing the year it's almost 2010. HTML should be well known by most developers by now. Despite this; I do still see people ignoring validation errors. As late as today I talked to a developer who found it very odd that invalid mark-up do render different in different browsers. There is nothing odd about that. Each time I am confronted with this topic I always run this simple example to illustrate what is going on.

Read More

Code sniplets – part I

I do collect sniplets of code. I have them all over the place. Almost every time I read about or bump into a technique, pattern, tests or new way of doing things I find useful of interesting I tend to test it out on my own. Mostly for my own curiosity but also because I learn and understand the concepts easier this way. These sniplets are small isolated bits of test code with comments more or less meant only for my self. Lately I've had some time to start to organize some of those sniplets and write a bit more out filling comments and tests on them than I usually do. Here are the first couple of sniplets.

Read More

Pitfalls to watch out for when creating Edge Side Includes

When creating Edge Side Includes (ESI) there are - as pointed out earlier - pitfalls one can fall into. Falling into such a pitfall will definitely reduce the effects of applying ESI so it's important to try to avoid doing so. There are no strict rules for what defines a pitfall, but in this post I will try to give some example for what to look out for and how we can try to work around them.

Read More

How to create a var attribute on scriptless tags

JavaServer Pages 2.0 have a feature called Scriptless tags. Scriptless tags are in a way traditional taglibs but written i JSP and they do provide a good feature to JSP. I must have written tons of JSP during the years and I am not gonna discuss JSP in general here but I've always found the JSP documentation kind of unintuitive and lacking good simple examples on some issues.
It might be my search phrases which are poor, but one such issue I've newer found a simple example on is the simple task of defining a var attribute on a scriptless tag. So here is my note to self example on creating a scriptless tag with a var attribute.

Read More

What to think of when creating Edge Side Includes

In my previous post I wrote about Edge Side Includes (ESI) and how ESI can have huge benefits on the server side. The trick about ESI is to be able to serve parts of a web page as fragments and then let the ESI enabled proxy include these fragments into a whole page. One natural question when dividing a page into fragments is what should go into each fragment. There is no straight answer for this question and the answer will be different with each case, but I think there are some simple rules one should keep in mind when dividing a page into fragments for ESI inclusion.

Read More

Edge Side Includes explained simple

Edge Side Includes, or ESI, are a technology which has been around for many years. Lately I've been working a lot with component based web development where ESI have been used and seeing the benefits ESI have on the server side, have made me wonder why ESI aren't more used. I do also find a lot of developers, specially web developers, go kind of whoooot?!? when mentioning ESI so in this article I will explain what ESI are and what the benefits it provides.

Read More

Bootstrapping JavaScript functions

At the moment I am working on a small JavaScript project which does interact extensively with the DOM. One goal in this project is simple integration with the document it shall work on. The preferred way of injection will be to just include the script in the head of the document and then the script does its "magic". This requirement combined with extensively interaction with the DOM does provide some challenges. The main issue which needs to be challenged in such a combination is to be sure the DOM are ready before the script starts to interact with it. Another challenge in this project is that I cannot use any of the JavaScript frameworks around. I ended up writing a bootstrap script.

Read More

Converting Web Slices to RSS

In writing, IE8 are just around the corner. One new features in IE8 which draws a lot of attention, if we listen to the IE team, is the Web Slices feature. I will not discuss if this will be useful for IE users or not, but when looking into the technology I did suddenly remember an old xslt published by our friends over at W3C. More specifically the xhtml to RSS xslt and it just hit me that Web Slices can be to great help in converting a web page into a RSS or ATOM feed.

Read More

Moving a script? IE might hit you twice!

I have seen a lot of strange browser bugs during the years, but I think this one is one of the strangest. This bug is related to IE6 and IE7 only and occurs when a script tag linking to an external JavaScript file is moved on a page and the content of the external JavaScript file is of an certain nature. This condition can make IE6 and IE7 hit the server twice instead of one.

Read More

Bye bye to IE6 in Norway

finn.no recommending IE6 users to upgrade

Yesterday an small revolution started in Norway. Finn.no placed an comment box on their frontpage visible only for IE6 users recommending IE6 users to change or upgrade their browser. Finn.no also published an recommendation (in norwegian) to fellow websites to do the same.

Read More