{"id":22823,"date":"2023-09-16T22:54:16","date_gmt":"2023-09-16T13:54:16","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=22823"},"modified":"2023-09-20T09:11:33","modified_gmt":"2023-09-20T00:11:33","slug":"%e3%80%90web%e6%8a%80%e8%a1%93%e3%80%91%e7%94%bb%e5%83%8f%e3%81%ae%e9%81%85%e5%bb%b6%e8%aa%ad%e3%81%bf%e8%be%bc%e3%81%bflazyload%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=22823","title":{"rendered":"\u3010Web\u6280\u8853\u3011\u753b\u50cf\u306e\u9045\u5ef6\u8aad\u307f\u8fbc\u307f(lazyload)\u306b\u3064\u3044\u3066"},"content":{"rendered":"\n<p>\u6628\u4eca\u3001\u56de\u7dda\u306e\u6027\u80fd\u304c\u3088\u304f\u306a\u3063\u3066\u3044\u308b\u306b\u305b\u3088\u81ea\u5206\u304c\u4eca\u8996\u899a\u3067\u898b\u3066\u3044\u308b\u90e8\u5206\u304b\u3089\u8aad\u307f\u8fbc\u3093\u3060\u65b9\u304c\u52b9\u7387\u7684\u3068\u3044\u3046\u767a\u60f3\u3002\u3044\u304d\u306a\u308a\u753b\u9762\u306b\u898b\u3048\u306a\u3044\u30d5\u30c3\u30bf\u30fc\u30b3\u30f3\u30c6\u30f3\u30c4\u304b\u3089\u8868\u793a\u3055\u305b\u3066\u3082\u7121\u99c4\u3002<\/p>\n\n\n\n<p>wordPress\u306b\u3082\u305d\u3046\u3044\u3046\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4ed5\u7d44\u307f<\/h2>\n\n\n\n<p>\u57fa\u672c\u76ee\u306b\u898b\u3048\u308b\u90e8\u5206\u304b\u3089\u51e6\u7406\u3055\u308c\u308b\u3002\u4e00\u6c17\u306b\u30da\u30fc\u30b8\u306e\u753b\u50cf\u3092\u3059\u3079\u3066\u8aad\u307f\u8fbc\u3080\u306e\u3067\u306f\u306a\u304f\u3001\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u305f\u3073\u306b\u753b\u50cf\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u3088\u3046\u306a\u6319\u52d5\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30e1\u30ea\u30c3\u30c8<\/h2>\n\n\n\n<p>\u76f4\u5e30\u7387\u3068\u96e2\u8131\u7387\u304c\u4e0b\u304c\u308b\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001\u6280\u8853\u7684\u306a\u8996\u70b9\u306b\u3057\u3066\u3082\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u306a\u3051\u308c\u3070\u7121\u99c4\u306a\u901a\u4fe1\u91cf\u304c\u304b\u304b\u3089\u306a\u304f\u306a\u308b\u306e\u3067\u30e1\u30ea\u30c3\u30c8\u304c\u5927\u304d\u3044\u3067\u3059\u3002\uff08\u6628\u4eca\u306e\u30af\u30e9\u30a6\u30c9\u30d9\u30fc\u30b9\u306e\u5206\u6790\u30c4\u30fc\u30eb\u3068\u304b\u306f\u901a\u4fe1\u91cf\u304c\u8ab2\u91d1\u306e\u57fa\u6e96\u306b\u306a\u3063\u3066\u3044\u308bSaaS\u304c\u591a\u3044\u3067\u3059\u3057\u3002\uff09<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">loading=\"lazy\"<\/h2>\n\n\n\n<p>img\u30bf\u30b0\u3059\u3079\u3066\u306b\u5bfe\u3057\u3066loading=\"lazy\"\u3092\u6307\u5b9a\u3057\u3066\u3042\u3052\u308c\u3070\u9045\u5ef6\u8aad\u307f\u8fbc\u307f\u306e\u5b9f\u88c5\u304c\u7c21\u5358\u306b\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3001\u53e4\u3081\u306e\u30d6\u30e9\u30a6\u30b6\u3068\u304biOS\u3068\u304b\u3060\u3068\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u308a\u3059\u308b\u306e\u304c\u5f31\u70b9\u3067\u3059\u3002\uff08Chrome\u3067\u3044\u3048\u3070\u30012019\u5e74\u306e77\u4ee5\u964d\u3001iOS\u306a\u308915.4\u4ee5\u964d\u3057\u304b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u7279\u306biOS\u306f\u53e4\u3044\u307e\u307e\u4f7f\u3063\u3066\u3044\u308b\u4eba\u3082\u3044\u308b\u3067\u3057\u3087\u3046\u3002\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;img loading=\"lazy\" src=\"images\/620023642.jpg\" alt=\"\" width=\"400\" height=\"300\" \/&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">lazysizes.js<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u5165\u624b\u3067\u304d\u307e\u3059\u3002\u5c5e\u6027\u3067data-src\u3092\u6307\u5b9a\u3059\u308b\u306e\u3068class\u306b\"lazyload\"\u3068\u6307\u5b9a\u3059\u308c\u3070\u5b9f\u88c5\u53ef\u80fd\u3067\u3059\u3002\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3048\u3070\u53e4\u3044\u30d6\u30e9\u30a6\u30b6\u3067\u3082\u9045\u5ef6\u8aad\u307f\u8fbc\u307f\u306b\u5bfe\u5fdc\u3055\u305b\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/aFarkas\/lazysizes\">https:\/\/github.com\/aFarkas\/lazysizes<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;img data-src=\"\u753b\u50cf1.jpg\" class=\"lazyload\" &gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">React\u306e\u9045\u5ef6\u8aad\u307f\u8fbc\u307f<\/h2>\n\n\n\n<ul>\n<li>\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30a4\u30f3\u30dd\u30fc\u30c8\uff08import('\u30e2\u30b8\u30e5\u30fc\u30eb\u540d'))<\/li>\n\n\n\n<li>React.lazy<\/li>\n\n\n\n<li>suspense<\/li>\n<\/ul>\n\n\n\n<p>\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30a4\u30f3\u30dd\u30fc\u30c8\u3068\u306f\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u6642\u70b9\u3067\u52d5\u7684\u306b\u8aad\u307f\u8fbc\u3080\u3053\u3068\u3092\u6307\u3057\u307e\u3059\u3002\u975e\u540c\u671f\u7684\u306a\u51e6\u7406\u306b\u306a\u308a\u307e\u3059\u3002\u901a\u5e38React\u3060\u3068\u9759\u7684\u30a4\u30f3\u30dd\u30fc\u30c8\uff08import AAA from \"\u30e2\u30b8\u30e5\u30fc\u30eb\u540d\"\uff09\u304c\u4f7f\u308f\u308c\u308b\u3053\u3068\u304c\u591a\u3044\u306e\u3067\u3059\u304c\u3001\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30a4\u30f3\u30dd\u30fc\u30c8\u306a\u3089\u63cf\u753b\u6642\u306b\u3059\u3079\u3066\u30ed\u30fc\u30c9\u3057\u305f\u3046\u3048\u3067\u63cf\u753b\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u3057\u306a\u304f\u3066\u3088\u304f\u306a\u308b\u306e\u3067\u521d\u671f\u63cf\u753b\u304c\u65e9\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3060\u3001\u305d\u306e\u969b\u306b\u3001React.lazy\u3084suspense\u3067\u753b\u9762\u4e0a\u307e\u3060loading\u4e2d\u3067\u3042\u308b\u3053\u3068\u3092\u8868\u793a\u3057\u3066\u3042\u3052\u308b\u5b9f\u88c5\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u6628\u4eca\u3001\u56de\u7dda\u306e\u6027\u80fd\u304c\u3088\u304f\u306a\u3063\u3066\u3044\u308b\u306b\u305b\u3088\u81ea\u5206\u304c\u4eca\u8996\u899a\u3067\u898b\u3066\u3044\u308b\u90e8\u5206\u304b\u3089\u8aad\u307f\u8fbc\u3093\u3060\u65b9\u304c\u52b9\u7387\u7684\u3068\u3044\u3046\u767a\u60f3\u3002\u3044\u304d\u306a\u308a\u753b\u9762\u306b\u898b\u3048\u306a\u3044\u30d5\u30c3\u30bf\u30fc\u30b3\u30f3\u30c6\u30f3\u30c4\u304b\u3089\u8868\u793a\u3055\u305b\u3066\u3082\u7121\u99c4\u3002 wordPress\u306b\u3082\u305d\u3046\u3044\u3046\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3042\u308a\u307e\u3059\u3002 \u4ed5 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[122],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/22823"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=22823"}],"version-history":[{"count":11,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/22823\/revisions"}],"predecessor-version":[{"id":23039,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/22823\/revisions\/23039"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=22823"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=22823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}