Archive for the '(x)HTML(5)' Category

Minimum Viable Sharing Meta Tags

Dec 28th, 2017

MVSMT for short… yeah, like this is going to catch on. So anyway. Before starting publishing the Web Performance Calendar this year I though: hey, them articles should show up nicer when shared in the most Social of Medias. You know, a big ol’ image and that. (It’s not really how I talk actually, even […]

 

List of all the countries: HTML select and JSON too

Nov 6th, 2016

Ever needed a list of all the countries in the world to put as options in an HTML select? Well, here you go. And JSON too. You’re welcome! But how… How was the list derived so you can update it once in a while? Glad you asked. https://www.iso.org/obp/ui/#search/code/ is the page linked from W3 spec […]

 

Hello WebMIDI

Oct 30th, 2016

Inspired by this talk by Jean-Philippe Côté I saw at Web Unleashed in Toronto last month, I thought I should dust off the old midi cable. MIDI? MIDI is a protocol that various music and lighting devices use to talk to each other. Believe it or not v1.0 of the spec from 1983 is still […]

 

Oversharing with the browser’s autofill

Oct 12th, 2016

Auto-filling forms is cool. Unless, of course, you give away more data than you thought you were. The basics It’s pretty simple, actually. You just add an autocomplete attribute to your <input> and give it one of the predefined values. And off you go. For example: <input type=”text” autocomplete=”given-name”> When the browser sees this, it […]

 

getUserMedia in Opera 12

Jun 14th, 2012

Opera 12 wins – the first stable desktop browser to ship getUserMedia(). I believe they had shipped it already in a mobile version of the browser. (I’ll need to fix my example from last night because Chrome Canary uses webkitGetUserMedia and also uses a stream URL to assign to video element’s src) You can start […]

 

Canvas pixels #3: getUserMedia

Jun 13th, 2012

getUserMedia() is a proposal for one of the most desired device APIs that can give HTML and JS access to the user’s camera and microphone. It’s already available in Chrome Canary in the form of navigator.webkitGetUserMedia(). It’s also available in Opera without a prefix. In part #1 of this miniseries I talked about manipulating pixels […]

 

Canvas pixels #2: convolution matrix

Jun 11th, 2012

In the previous post I talked about manipulating and changing pixels in an image (using JavaScript and canvas) one at a time. We took a single pixel and messed around with its R, G, B or A values. This time let’s look into taking account not only the single pixel but the pixels around it. […]

 

Pixel manipulation in canvas

Jun 10th, 2012

Done it before with PHP, but now that JavaScript is all-powerful, let’s see how we can manipulate images in an HTML <canvas>. The demo is here. Pixel manipulation The simplest way to fiddle with image data is to take each pixel and change the value of one or more of its channels: red, green, blue […]

 

x-webkit-speech input and textareas

Aug 6th, 2011

New hotness, speech input. (The demo, the demo) You get an input: <input> You add an x-webkit-speech attribute <input x-webkit-speech> And voila! Or if you don’t have a recent Chrome version, here’s what these who have a recent Chrome version see: Nice. Textareas Speech inputs – gotta love them. But in textareas – you can’t […]

 

Lazy HTML evaluation

Jun 8th, 2011

#7 This post is part of the Velocity countdown series. Stay tuned for the articles to come. Some time ago Google talked about using a sort of lazy JavaScript evaluation which especially helps mobile devices. The idea was to comment out a chunk of JavaScript you don’t need right away and serve it this way. […]

 

a DOCTYPE is all it takes

Jul 25th, 2008

At a lunch conversation about quirks vs standards mode, the question was raised: but what if you don’t have those kinda important tags such as <html> or <body>? is this going to be quirks mode? Well, the following test case shows that a DOCTYPE is all it takes in order to have standards mode rendering. […]

 

When client-only validation is good for business

Apr 13th, 2008

You should never never ever rely on client-side validation only. Client-side validation is for enhancing user experience, server-side is the validation. This is a rule, never to be broken. But here’s a funny story how skipping the server-side validation actually helped. This is a real story, but the actual names have been replaced in XXX, […]

 

The Front-end Cerberus

Oct 25th, 2007

Some smart guys picture the distinction of content (HTML), presentation (CSS) and behaviour (JavaScript) as a three-legged stool. This is totally fine, but can’t we draw a more heroic picture of today’s Front-end developer? I found the image here, if anyone knows the original author, let me know so I can give proper credit. BTW, […]

 

HTML2DOM

Sep 14th, 2006

Here’s this HTML-2-DOM service – http://www.html2dom.com What it does is pretty simple – you paste some HTML code and the output is JS script code that uses DOM functions to produce the same result. Could be useful when you’re working on an AJAX-style app that generates new content using JavaScript. I build this simple script, […]

 

IE script tag problem

Oct 18th, 2005

When calling external scripts, you cannot use the shorthand for the <script> tag, because you get a blank page in IE.