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

JavaScript over HTTP2

JavaScript over HTTP2

Yuki Ishikawa

May 08, 2016
Tweet

More Decks by Yuki Ishikawa

Other Decks in Technology

Transcript

  1. ͳͥϏϧυ͕ඞཁ͔ • ϒϥ΢βͷ໰୊ • ES2015 / AltJS ಈ͔ͳ͍ • ґଘؔ܎ΛղܾͰ͖ͳ͍

    • ύϑΥʔϚϯεͷ໰୊ • ϑΝΠϧ਺ଟ͍ͱΦʔόʔϔουͰ͔͍ • ࠷దԽ / ѹॖ ͢Δͱޮ཰͕ྑ͍
  2. ͳͥϏϧυ͕ඞཁ͔ • ϒϥ΢βͷ໰୊ • ES2015 / AltJS ಈ͔ͳ͍ • ґଘؔ܎ΛղܾͰ͖ͳ͍

    • ύϑΥʔϚϯεͷ໰୊ • ϑΝΠϧ਺ଟ͍ͱΦʔόʔϔουͰ͔͍ • ࠷దԽ / ѹॖ ͢Δͱޮ཰͕ྑ͍ ͦͷ͏ͪ ͳΜͱ͔ͳΔ ŋ@ŋA Ͳ͏ʹͰ΋ͳΔ )551
  3. HTTP ͷྺ࢙ • 1991 HTTP/0.9 • 1996 HTTP/1.0 • 1999

    HTTP/1.1 : • 2009 SPDY/1 • 2013 SPDY/3.1 • 2015 HTTP/2.0 8FC͕Ί·͙Δ͘͠
 มԽ͢Δதɺ)551͸ఀ଺ (PPHMF͕41%:Λఏএ 41%:͸ )551ʹٵऩ
  4. HTTP/2 ͷಛ௃ • HTTP 1.1 ͷηϚϯςΟΫεΛҡ࣋ͨ͠··
 ύϑΥʔϚϯεΛվળ • ΑΓෳࡶʹ •

    όΠφϦϓϩτίϧ • ଟॏԽ • ༏ઌ౓੍ޚ • αʔόϓογϡ
  5. HTTP/1.1 • TCP ίωΫγϣϯΛ
 ϦΫΤετຖʹషΓ௚͠ • ࠷େ̒ίωΫγϣϯͰฒྻ $MJFOU 4FSWFS (&5

    (&5TUZMFDTT (&5CVOEMFKT 3FTQPOTF 3FTQPOTFTUZMFDTT 3FTQPOTFCVOEMFKT
  6. HTTP/2 • 1ຊͷ TCP ίωΫγϣϯΛ
 ࠷େݶ׆༻ • ̍ίωΫγϣϯʹ
 ετϦʔϜΛଟॏԽ •

    όΠφϦϑϨʔϜ + ѹॖ • ඞཁͳ Assets Λ༧Ί Push
 (Server Push) $MJFOU 4FSWFS (&5 164)TUZMFDTT 164)CVOEMFKT 3FTQPOTF
  7. JSer ͔ΒΈͨ HTTP/2 • HTTP/1.1 ͷ৔߹ • ϦΫΤετ਺͸গͳ͍΄͏͕͍͍ • webpack

    or Browserify େਖ਼ٛ • HTTP/2 ͷ৔߹ • ଟॏԽ͍ͯ͠ΔͷͰϑΝΠϧଟͯ͘΋ฏؾ • Ή͠ΖݻΊͳ͍΄͏͕͍͍ʁ