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 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 Slide

  3. HTTP:
    {Stateless
    Connection:closed

    View Slide

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

    View Slide

  5. View Slide

  6. Connection:keep-alive
    HTTP/1.1

    View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. View Slide

  11. WS

    View Slide

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

    View Slide

  13. View Slide

  14. View Slide

  15. HTTP/1.1 101 WebSocket Protocol HandShake

    View Slide

  16. 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 Slide

  17. See you next time:)

    View Slide