When I was eating my breakfast at work Monday morning, the Microsoft developer evangelist Daniel called me on my cell phone. “Have you checked your mail?” he asked and I could hear in his voice that he was smiling more than usually. “Yes, of course” I replied, “Why?”. “You won the 2009 MVP award in ASP.NET”.
“SAY WHAT, for reals homes? That's awesome, but I didn't get the e-mail”. He assured me I won the award anyway, we hung up and I was really happy that I won the MVP. However, I did have a problem with the missing e-mail. What if Daniel was misinformed or some other mix-up had made me overly exited on false premise. I would be devastated if that was the case, since Daniel got me all worked up. Well, Daniel reassured me a couple of times during the day about the validity of his claim and that made me relax a bit.
Still, without that e-mail I wouldn’t know for sure…
Later that day I found the mail in Outlook’s spam filter, so now it's official.
Yesterday I was looking at XHTML and accessibility standards for BlogEngine.NEXT and found something I haven’t noticed before in the W3C specs. I came across some rules about specifying the default script and style sheet language when trying out the Total Validator.
By specifying the default script language you tell the browser what language all the onclick and other events specified in the HTML should be interpreted in. It’s probably always text/javscript but it could be text/vbscript or something else.
The same goes with the style sheet type. It’s always text/css when you use the style attribute in the HTML.
To tell the browser about the default script language and style sheet type, you can either add meta-tags or custom HTTP headers.
The meta-tags
<META http-equiv="Content-Style-Type" content="text/css">
<META http-equiv="Content-Script-Type" content="text/javascript">
The HTTP headers
Response.AppendHeader("Content-Style-Type", "text/css");
Response.AppendHeader("Content-Script-Type", "text/javascript");
The headers should be added to all .aspx pages. The easiest way to do that is in the master page or global.asax.