{"id":1978,"date":"2019-09-30T10:00:59","date_gmt":"2019-09-30T01:00:59","guid":{"rendered":"http:\/\/domore.co.jp\/speedcurve\/?p=1978"},"modified":"2022-10-28T01:55:58","modified_gmt":"2022-10-27T16:55:58","slug":"abtest-jsonp-preloader","status":"publish","type":"post","link":"https:\/\/www.domore.co.jp\/speedcurve\/metric\/abtest-jsonp-preloader\/","title":{"rendered":"A \/ B\u30c6\u30b9\u30c8JSONP\u3068\u00a0 RUM\u306e\u30d7\u30ea\u30ed\u30fc\u30c0\u30fc\u3002"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">2017\u5e745\u67082\u65e5\u706b\u66dc\u65e5<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" class=\"wp-image-1979 alignnone\" src=\"http:\/\/domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/steve-souders.424-2.jpg\" alt=\"\" width=\"45\" height=\"45\" srcset=\"https:\/\/www.domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/steve-souders.424-2.jpg 577w, https:\/\/www.domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/steve-souders.424-2-150x150.jpg 150w, https:\/\/www.domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/steve-souders.424-2-300x300.jpg 300w, https:\/\/www.domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/steve-souders.424-2-60x60.jpg 60w, https:\/\/www.domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/steve-souders.424-2-120x120.jpg 120w\" sizes=\"(max-width: 45px) 100vw, 45px\" \/>\u3000Steve Souders<\/span><\/p>\n<p><span style=\"font-weight: 400;\">SpeedCurve\u306fSPA\uff08Single Page App\uff09\u3067\u3042\u308b\u305f\u3081\u3001<\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/JSONP\"><span style=\"font-weight: 400;\">JSONP<\/span><\/a><span style=\"font-weight: 400;\">\u3092\u4f7f\u7528\u3057\u3066\u30c1\u30e3\u30fc\u30c8\u3092\u52d5\u7684\u306b\u4f5c\u6210\u3057\u307e\u3059\u3002 \u79c1\u305f\u3061\u306f\u5e38\u306b\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u3088\u308a\u901f\u304f\u3059\u308b\u65b9\u6cd5\u3092\u6a21\u7d22\u3057\u3066\u3044\u307e\u3059\u3002 \u52d5\u7684\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u306e1\u3064\u306e\u6b20\u70b9\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306e<\/span><a href=\"https:\/\/www.smashingmagazine.com\/2016\/02\/preload-what-is-it-good-for\/\"><span style=\"font-weight: 400;\">\u30d7\u30ea\u30ed\u30fc\u30c0\u30fc<\/span><\/a><span style=\"font-weight: 400;\">\u304c\u4f7f\u7528\u3055\u308c\u306a\u3044\u3053\u3068\u3067\u3059\u3002 \u3053\u308c\u306f\u5f8c\u306eSPA\u8981\u6c42\u306e\u8981\u56e0\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u6700\u521d\u306e\u30da\u30fc\u30b8\u30d3\u30e5\u30fc\u3067\u30d7\u30ea\u30ed\u30fc\u30c0\u30fc\u304c\u307e\u3060\u3044\u304f\u3064\u304b\u306e\u5229\u70b9\u3092\u3082\u305f\u3089\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u307e\u305f\u306f\u305d\u3046\u3067\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 \u79c1\u305f\u3061\u306f\u78ba\u4fe1\u304c\u6301\u3066\u307e\u305b\u3093\u3067\u3057\u305f\u306e\u3067\u3001A \/ B\u30c6\u30b9\u30c8\u3092\u5b9f\u65bd\u3057\u307e\u3057\u305f\u3002 \u9577\u3044\u8a71\u3092\u7c21\u5358\u306b\u8a00\u3048\u3070\u3001\u6700\u521d\u306eJSONP\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u30de\u30fc\u30af\u30a2\u30c3\u30d7\u3067\u5b9f\u884c\u3059\u308b\u3068\u3001\u30b0\u30e9\u30d5\u306f300ms\u306e\u901f\u3055\u3067\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-large wp-image-1980\" src=\"http:\/\/domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/jsonpmarkup-1024x492.png\" alt=\"\" width=\"1024\" height=\"492\" srcset=\"https:\/\/www.domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/jsonpmarkup-1024x492.png 1024w, https:\/\/www.domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/jsonpmarkup-300x144.png 300w, https:\/\/www.domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/jsonpmarkup-768x369.png 768w, https:\/\/www.domore.co.jp\/speedcurve\/wp-content\/uploads\/2019\/07\/jsonpmarkup.png 1190w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">\u79c1\u305f\u3061\u306eRUM\u88fd\u54c1<\/span><a href=\"https:\/\/speedcurve.com\/features\/lux\/\"><span style=\"font-weight: 400;\">LUX<\/span><\/a><span style=\"font-weight: 400;\">\u3092\u4f7f\u7528\u3057\u3066\u3053\u306eA \/ B\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3059\u308b\u306e\u306f\u7c21\u5358\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> \u6700\u521d\u306e\u30b9\u30c6\u30c3\u30d7\u306f\u3001JSONP\u5fdc\u7b54\u304c\u53d7\u4fe1\u3055\u308c\u305f\u3068\u304d\u306b\u30de\u30fc\u30af\u3059\u308b<\/span><a href=\"https:\/\/www.w3.org\/TR\/user-timing\/\"><span style=\"font-weight: 400;\">User Timing<\/span><\/a><span style=\"font-weight: 400;\"> metric \u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u3053\u306e\u30e1\u30c8\u30ea\u30c3\u30af\u306fOnDataReceived\u3068\u547c\u3070\u308c\u307e\u3059\u3002 <\/span><a href=\"http:\/\/caniuse.com\/#feat=user-timing\"><span style=\"font-weight: 400;\">\u4e00\u822c\u7684\u306a\u30d6\u30e9\u30a6\u30b6\u306e\u4e2d\u306b\u306fUser Timing\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u306e\u3067<\/span><\/a><span style=\"font-weight: 400;\">\u3001LUX\u306eshim\u306fmark\uff08\uff09\u3068measure\uff08\uff09\u3092\u3059\u3079\u3066\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u4f7f\u7528\u3067\u304d\u308b\u305f\u3081\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0function OnDataReceived(jsondata) {<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 LUX.measure(&#8220;OnDataReceived&#8221;);<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 &#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u3001<\/span><a href=\"https:\/\/www.w3.org\/TR\/navigation-timing\/#dom-performancetiming-navigationstart\"><span style=\"font-weight: 400;\">NavigationStart<\/span><\/a><span style=\"font-weight: 400;\">\u304b\u3089JSONP\u5fdc\u7b54\u304c\u51e6\u7406\u3055\u308c\u308b\u307e\u3067\u306e\u6642\u9593\u3092\u6e2c\u5b9a\u3057\u307e\u3059\u3002 \u3059\u3079\u3066\u306e\u30e6\u30fc\u30b6\u30bf\u30a4\u30df\u30f3\u30b0\u30de\u30fc\u30af\u3068\u6e2c\u5b9a\u5024\u306f\u3001LUX\u306b\u3088\u3063\u3066\u81ea\u52d5\u7684\u306b\u30ad\u30e3\u30d7\u30c1\u30e3\u3055\u308c\u3001\u9867\u5ba2\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u30922\u3064\u306e\u30d0\u30b1\u30c3\u30c8\u306b\u5206\u5272\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d0\u30b1\u30c3\u30c8\u3067\u306f\u3001JSONP\u3092\u8aad\u307f\u8fbc\u307f\u7d9a\u3051\u307e\u3059\u3002\u30c6\u30b9\u30c8\u30d0\u30b1\u30c3\u30c8\u3067\u306f\u3001\u30de\u30fc\u30af\u30a2\u30c3\u30d7\u3092\u4f7f\u7528\u3057\u3066JSONP\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u884c\u3044\u307e\u3059\u3002 LUX\u306e <\/span><a href=\"http:\/\/support.speedcurve.com\/apis\/lux-api#luxadddataname-value\"><span style=\"font-weight: 400;\">addData API<\/span><\/a><span style=\"font-weight: 400;\">\u3092\u4f7f\u7528\u3057\u3066\u3001\u3053\u308c\u3089\u306e\u30d0\u30b1\u30c3\u30c8\u3092\u4ecb\u3057\u3066RUM\u30c7\u30fc\u30bf\u3092\u30bb\u30b0\u30e1\u30f3\u30c8\u5316\u3057\u307e\u3059\u3002 \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d0\u30b1\u30c3\u30c8\u306fJsonpMarkup = no\u3001\u30c6\u30b9\u30c8\u30d0\u30b1\u30c3\u30c8\u306fJsonpMarkup = yes\u3067\u3059\u3002 \u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306ePHP\u30b9\u30cb\u30da\u30c3\u30c8\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0if ( rand(0,1) ) {<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 echo &#8220;&lt;script&gt;onGo();&lt;\/script&gt;\\n&#8221;; \/\/ request JSONP dynamically<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 echo &#8220;&lt;script&gt;LUX.addData(&#8216;JsonpMarkup&#8217;, &#8216;no&#8217;);&lt;\/script&gt;\\n&#8221;;<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 }<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 else {<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 echo &#8220;&lt;script src=&#8217;\/site-data?jsonp=OnDataReceived&#8217;&gt;&lt;\/script&gt;\\n&#8221;;<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 echo &#8220;&lt;script&gt;LUX.addData(&#8216;JsonpMarkup&#8217;, &#8216;yes&#8217;);&lt;\/script&gt;\\n&#8221;;<\/span><span style=\"font-weight: 400;\"><br \/><\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 }<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u6570\u5206\u4ee5\u5185\u306b\u3001\u30c7\u30fc\u30bf\u306f\u3001JsonpMarkup = yes\u30d0\u30b1\u30c3\u30c8\u3067OnDataReceived\u304c\u301c300\u33b3\u9ad8\u901f\u3067\u3042\u308b\u3053\u3068\u3092\u793a\u3057\u307e\u3059\u3002 \u30d6\u30e9\u30a6\u30b6\u30d7\u30ea\u30ed\u30fc\u30c0\u30fc\u306e\u304a\u304b\u3052\u3067\u3001\u6700\u521d\u306eJSONP\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u30de\u30fc\u30af\u30a2\u30c3\u30d7\u3092\u4f7f\u7528\u3059\u308b\u65b9\u304c\u9ad8\u901f\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001A \/ B\u30c6\u30b9\u30c8\u3092\u6570\u65e5\u9593\u5b9f\u884c\u3057\u307e\u3057\u305f\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">JavaScript\u3092\u4f7f\u7528\u3057\u3066\u52d5\u7684\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u884c\u3046\u5834\u5408\u3001\u30d7\u30ea\u30ed\u30fc\u30c0\u30fc\u306b\u305d\u306e\u51e6\u7406\u3092\u4efb\u305b\u308b\u3053\u3068\u3067\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6a5f\u4f1a\u3092\u9003\u3057\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u306f\u3001JSONP\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5bfe\u3057\u3066\u771f\u5b9f\u3067\u306f\u306a\u304f\u3001\u753b\u50cf\u306b\u3082\u9069\u7528\u3055\u308c\u307e\u3059\u3002 \u3053\u306e\u6700\u9069\u5316\u306b\u3064\u3044\u3066\u8208\u5473\u304c\u3042\u308b\u5834\u5408\u306f\u3001A \/ B\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3066\u3001\u30de\u30fc\u30af\u30a2\u30c3\u30d7\u3092\u4f7f\u7528\u3057\u3066\u6700\u521d\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u30b5\u30a4\u30c8\u3092\u3088\u308a\u901f\u304f\u3001\u30e6\u30fc\u30b6\u30fc\u3092\u3088\u308a\u5e78\u305b\u306b\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/span><a href=\"https:\/\/speedcurve.com\/features\/lux\/#snippet\"><span style=\"font-weight: 400;\"> LUX\u306e\u7121\u6599\u8a66\u7528\u7248<\/span><\/a><span style=\"font-weight: 400;\">\u3092\u7528\u610f\u3057\u3066\u3001\u7c21\u5358\u306b\u30d4\u30fc\u30ca\u30c3\u30c4\uff08\u30ec\u30e2\u30f3\u30b9\u30af\u30a4\u30fc\u30b8\u30fc\uff09\u3092\u4f5c\u3063\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/span><\/p>\n\n\n<p>\u3054\u8cea\u554f\u3084\u304a\u554f\u5408\u305b\u306f\u3001<a href=\"mailto:speedcurve@domore.co.jp\">speedcurve@domore.co.jp<\/a>&nbsp;\u307e\u3067\u304a\u9858\u3044\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u203b\u3053\u306e\u8a18\u4e8b\u306fSpeedCurve\u793e\u306e\u82f1\u6587\u60c5\u5831\u3092\u5143\u306b\u3001\u5185\u5bb9\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u7de8\u96c6\u3001\u7ffb\u8a33\u3057\u305f\u8a18\u4e8b\u3067\u3059\u3002<\/p>\n\n\n\n<p>Copyright \u00a9 2021 SpeedCurve Limited. All Rights Reserved.<\/p>\n","protected":false},"excerpt":{"rendered":"2017\u5e745\u67082\u65e5\u706b\u66dc\u65e5 \u3000Steve Souders SpeedCurve\u306fSPA\uff08Single Page App\uff09\u3067\u3042\u308b\u305f\u3081\u3001JSONP\u3092\u4f7f\u7528\u3057\u3066\u30c1\u30e3\u30fc\u30c8\u3092\u52d5\u7684\u306b\u4f5c\u6210\u3057\u307e\u3059\u3002 \u79c1\u305f\u3061\u306f\u5e38\u306b\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u3088\u308a\u901f\u304f\u3059\u308b [&hellip;]","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,16],"tags":[],"_links":{"self":[{"href":"https:\/\/www.domore.co.jp\/speedcurve\/wp-json\/wp\/v2\/posts\/1978"}],"collection":[{"href":"https:\/\/www.domore.co.jp\/speedcurve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.domore.co.jp\/speedcurve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.domore.co.jp\/speedcurve\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.domore.co.jp\/speedcurve\/wp-json\/wp\/v2\/comments?post=1978"}],"version-history":[{"count":3,"href":"https:\/\/www.domore.co.jp\/speedcurve\/wp-json\/wp\/v2\/posts\/1978\/revisions"}],"predecessor-version":[{"id":2760,"href":"https:\/\/www.domore.co.jp\/speedcurve\/wp-json\/wp\/v2\/posts\/1978\/revisions\/2760"}],"wp:attachment":[{"href":"https:\/\/www.domore.co.jp\/speedcurve\/wp-json\/wp\/v2\/media?parent=1978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.domore.co.jp\/speedcurve\/wp-json\/wp\/v2\/categories?post=1978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.domore.co.jp\/speedcurve\/wp-json\/wp\/v2\/tags?post=1978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}