Upgrade to Pro — share decks privately, control downloads, hide ads and more …

"HTML5" Transport Protocol

"HTML5" Transport Protocol

HTTP powers all the new fancy HTML5 stuff. Learn how to use, not abuse it.

Video: http://lanyrd.com/2011/lwsmix/scckq/

London Web Standards, January 2011

Kornel Lesiński

September 26, 2011
Tweet

More Decks by Kornel Lesiński

Other Decks in Technology

Transcript

  1. “HTM L5” AKA N.E.W .T. HTML5 Video CSS3 Server-sent events

    XHTML5 Web Sockets Live Streaming NoSQL DB the actual XMLHttpRequest Web APIs
  2. HTTP/1.1'200'OK Date:'Tue,'18'Jan'2011'20:00:00'GMT' Server:'Apache' ContentAType:'text/html;'charset=utfA8 LastAModified:'Wed,'08'Sep'2010'06:34:43'GMT' ContentALength:'5447' ContentALanguage:'enAGBAxAHixie' Connection:'close' <!DOCTYPE'HTML> <html>

    '<head> ''<title>Web'Hypertext'Application'Technology' Working'Group</title> ''<link'rel="stylesheet"'media="all"'href="/ style/tabbedApages"> ''<link'rel="icon"'href="/images/icon"> '</head> '<body> ''<h1'class="simple"><img'src="/images/logo"' alt="">'Welcome'to'the'WHATWG'community</h1> ''<p'class="byline"><em>Maintaining'and'evolving' HTML'since'2004</em></p>''<p>Want'to'get'involved' and'help'out?'<a'href="http://wiki.whatwg.org/ wiki/What_you_can_do">See'a'list'of'things'for' which'we'need'volunteers</a>'and'jump'in!</p>''<p' class="whatAtoAdo"><a'href="http:// wiki.whatwg.org/wiki/FAQ"><em>FAQ</em>'<span>Get' answers</span>'<span>to'your'questions</span></ a></p>''<p'class="whatAtoAdo"><a'href="http://
  3. HTTP/1.1'200'OK Date:'Tue,'18'Jan'2011'20:00:00'GMT' Server:'Apache' ContentAType:'text/html;'charset=utfA8 LastAModified:'Wed,'08'Sep'2010'06:34:43'GMT' ContentALength:'5447' ContentALanguage:'enAGBAxAHixie' Connection:'close' <!DOCTYPE'HTML> <html>

    '<head> ''<title>Web'Hypertext'Application'Technology' Working'Group</title> ''<link'rel="stylesheet"'media="all"'href="/ style/tabbedApages"> ''<link'rel="icon"'href="/images/icon"> '</head> '<body> ''<h1'class="simple"><img'src="/images/logo"' alt="">'Welcome'to'the'WHATWG'community</h1> ''<p'class="byline"><em>Maintaining'and'evolving' HTML'since'2004</em></p>''<p>Want'to'get'involved' and'help'out?'<a'href="http://wiki.whatwg.org/ wiki/What_you_can_do">See'a'list'of'things'for' which'we'need'volunteers</a>'and'jump'in!</p>''<p' class="whatAtoAdo"><a'href="http:// wiki.whatwg.org/wiki/FAQ"><em>FAQ</em>'<span>Get' answers</span>'<span>to'your'questions</span></ a></p>''<p'class="whatAtoAdo"><a'href="http://
  4. HTTP/1.1'200'OK Date:'Tue,'18'Jan'2011'20:00:00'GMT' Server:'Apache' ContentAType:'text/html;'charset=utfA8 LastAModified:'Wed,'08'Sep'2010'06:34:43'GMT' ContentALength:'5447' ContentALanguage:'enAGBAxAHixie' Connection:'close' <!DOCTYPE'HTML> <html>

    '<head> ''<meta'httpAequiv="ContentAType"'content="text/ html;'charset=utfA8"> ''<title>Web'Hypertext'Application'Technology' Working'Group</title> ''<link'rel="stylesheet"'media="all"'href="/ style/tabbedApages"> ''<link'rel="icon"'href="/images/icon"> '</head> '<body> ''<h1'class="simple"><img'src="/images/logo"' alt="">'Welcome'to'the'WHATWG'community</h1> ''<p'class="byline"><em>Maintaining'and'evolving' HTML'since'2004</em></p>''<p>Want'to'get'involved' and'help'out?'<a'href="http://wiki.whatwg.org/ wiki/What_you_can_do">See'a'list'of'things'for' which'we'need'volunteers</a>'and'jump'in!</p>''<p' class="whatAtoAdo"><a'href="http:// wiki.whatwg.org/wiki/FAQ"><em>FAQ</em>'<span>Get'
  5. HTTP/1.1'200'OK Date:'Tue,'18'Jan'2011'20:00:00'GMT' Server:'Apache' ContentAType:'text/html;'charset=utfA8 LastAModified:'Wed,'08'Sep'2010'06:34:43'GMT' ContentALength:'5447' ContentALanguage:'enAGBAxAHixie' Connection:'close' <!DOCTYPE'HTML> <html>

    '<head> ''<meta'httpAequiv="ContentAType"'content="text/ html;'charset=utfA8"> ''<title>Web'Hypertext'Application'Technology' Working'Group</title> ''<link'rel="stylesheet"'media="all"'href="/ style/tabbedApages"> ''<link'rel="icon"'href="/images/icon"> '</head> '<body> ''<h1'class="simple"><img'src="/images/logo"' alt="">'Welcome'to'the'WHATWG'community</h1> ''<p'class="byline"><em>Maintaining'and'evolving' HTML'since'2004</em></p>''<p>Want'to'get'involved' and'help'out?'<a'href="http://wiki.whatwg.org/ wiki/What_you_can_do">See'a'list'of'things'for' which'we'need'volunteers</a>'and'jump'in!</p>''<p' class="whatAtoAdo"><a'href="http:// wiki.whatwg.org/wiki/FAQ"><em>FAQ</em>'<span>Get'
  6. http://lists.w3.org/Archives/Public/www-html/2000Sep/0024.html The HTML WG has discussed this issue: the intention

    was to allow old (HTML-only) browsers to accept XHTML 1.0 documents by following the guidelines, and serving them as text/html. Therefore, documents served as text/html should be treated as HTML and not as XHTML. There should be no sniffing of text/html documents to see if they are really XHTML. Note that there are some semantic differences between HTML documents and XHTML documents: there are specific CSS rules that only apply to HTML (and not XHTML), and the DOM has different effects (for instance, the element names are returned in uppercase for HTML, and lower case for XHTML). Best wishes, Steven Pemberton Chair, W3C HTML WG ” “
  7. Firefox Strict MIME type Safari Strict MIME type Opera Strict

    MIME type Internet Explorer Strict MIME type W3C Validator Sniffs DOCTYPE http://www.w3.org/Bugs/Public/show_bug.cgi?id=1500
  8. http://pornel.net/1 http://pornel.net/2 HTTP/1.0'200'OK ContentAType:'text/html <div'xmlns="http://www.w3.org/1999/xhtml"' ' ''''''style="color:green"> <span'style="color:red"/> What'color'is'it? </div>

    HTTP/1.0'200'OK ContentAType:'application/xhtml+xml <div'xmlns="http://www.w3.org/1999/xhtml"' ' ''''''style="color:green"> <span'style="color:red"/> What'color'is'it? </div> What'color'is'it? What'color'is'it?