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

Notification 2

kaiye
March 25, 2011

Notification 2

Http 1.1 protocol and HTML5 Web Socket API

kaiye

March 25, 2011
Tweet

More Decks by kaiye

Other Decks in Technology

Transcript

  1. Notification 2
    @kaiye

    View full-size slide

  2. [Constructor]
    interface Notification :
    EventTarget {
    void show ();
    void cancel ();
    attribute Function onclick;
    attribute Function onshow;
    attribute Function onerror;
    attribute Function onclose;
    attribute DOMString replaceId;
    attribute DOMString dir;
    };

    View full-size slide

  3. HTTP:
    {Stateless
    Connection:closed

    View full-size slide

  4. URL parameter
    ASP/PHP/JAVA
    Cookie & Session
    Stateless > Stateful

    View full-size slide

  5. Connection:keep-alive
    HTTP/1.1

    View full-size slide

  6. http://t.qq.com/jiaoshoutv

    View full-size slide

  7. HTTP/1.1 101 WebSocket Protocol HandShake

    View full-size slide

  8. Reference
    • 《Hypertext Transfer Protocol》
    http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#cite_note-
    ietf2616-0
    • 《The WebSocket API》
    http://dev.w3.org/html5/websockets/
    • 《Pro HTML5 Programming》
    http://prohtml5.com/

    View full-size slide

  9. See you next time:)

    View full-size slide