27 Aug

Tantek – How many ways can you slice a URL and name the pieces?

I was developing a small single purpose microsite and decided to build it using CASSIS not just for application logic, but for the server-side runtime execution and flow as well. I figured the needs of a simple real world site would work well to drive the design of a simple runtime.

No need to invent anything new, just re-use Apache/CGI environment variables (e.g. as used in PHP, like SERVER_NAME). But they look like old C constants, and CASSIS coders will be more familiar with Javascript.

Window.location’s properties seem reasonable, until you get to "search" for the "?" query part of a URL. What about the source, the specs for URL and HTTP? And that’s when I started to see the problem.

With a little more research I found a half-dozen different ways to slice and dice URLs. Kevin Marks asked me, what about Python? And that made seven. I published my research publicly on the microformats wiki, which is a good place to document existing formats for something (a key step in the microformats process).

Among all the differences (and overloading of the same terms to mean different things) it did seem that there were some patterns. So I made a diagram of a sample URL, chopped into pieces and named according to seven different conventions over the years, in the hopes that doing so might reveal such patterns.

via Tantek – How many ways can you slice a URL and name the pieces?. Or standards are so awesome everyone keeps making a new one.

15 May

Timeless – JSON: The JavaScript subset that isn’t

Because of these two invisible Unicode characters, JSON is not a subset of JavaScript. Close, but no cigar.

In most applications, you won’t notice this issue. First of all, the line separator and the paragraph separator isn’t exactly widely used. Secondly, any proper JSON parser will have no problems with parsing it.

However, when you’re dealing with JSONP there’s no way around: You’re forced to use the JavaScript parser in the browser. And if you’re sending data that other have entered, a tiny U+2028 or U+2029 might sneak in and break your pretty cross-domain API.

via Timeless – JSON: The JavaScript subset that isn’t. Wikipedia is wrong man.

07 Jun

hsivonen – -webkit-HTML5

The demos have three levels of obstacles for non-Safari browsers even if the other browsers implemented the HTML5 features being demoed (only video and audio; the rest is CSS!) and implemented the proposed CSS features once standardized:

via hsivonen – -webkit-HTML5. Apple promotes open standards by calling them by the wrong name and using the most closed version possible to prevent all other browsers from seeing the effects. Oh and one of the demos doesn’t even work in anything other than the latest version of Mac OSX.

31 Jan

Google Twists Knife In IE6, Pulls Support From Docs And Sites – TechCrunch

This has not been the greatest start to the year for Microsoft’s Internet Explorer browser. Days after news of the latest security flaw in Internet Explorer, Google is adding fuel to the fire by phasing out support for IE6 for two of its Google Apps products, Docs and Sites (which recently got an aesthetic upgrade).

via Google Twists Knife In IE6, Pulls Support From Docs And Sites.

The push for dropping IE6 just got a big boost from Google.