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

web over packaging

Jxck
June 13, 2018

web over packaging

Web over Packaging
at #chromejp 2018/6/13

Jxck

June 13, 2018
Tweet

More Decks by Jxck

Other Decks in Technology

Transcript

  1. View Slide

  2. View Slide










  3. View Slide







  4. View Slide

  5. https://google.com/amp/path to https://your-own-origin/path

    View Slide

  6. View Slide

  7. View Slide

  8. in https://labs.jxck.io
    click https://labs.jxck.io/~~~/mozaic.sxg
    display as https://mozaic.fm
    click
    actual URL
    application/signed-exchange;v=b0

    View Slide

  9. ⛓ + certificate chain in cbor

    View Slide

  10. actual: https://labs.jxck.io/~~~/mozaic.sgx
    display: https://mozaic.fm/

    View Slide

  11. View Slide








  12. View Slide

  13. webbundle = [
    ; in UTF-8.
    magic: h'F0 9F 8C 90 F0 9F 93 A6',
    section-offsets: bytes .cbor {* ($section-name .within tstr) =>
    [ offset: uint, length: uint] },
    sections: [* $section ],
    length: bytes .size 8, ; Big-endian number of bytes in the bundle.
    ]
    $section-name /= "index" / "manifest" / "critical" / "responses"
    $section /= index / manifest / critical / responses
    responses = [*response]

    View Slide

  14. Index for Response of index.html offset 100 length 200
    Index for Response of script.js offset 300 length 200
    ... ...
    HTTP Header + index.html body
    HTTP Header + script.js body
    ...
    100
    300

    View Slide







  15. View Slide

  16. View Slide

  17. View Slide















  18. View Slide









  19. View Slide















  20. View Slide

  21. View Slide