{"id":301931,"date":"2020-04-15T15:01:10","date_gmt":"2020-04-15T15:01:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=301931"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=301931","title":{"rendered":"\u041a\u0430\u043a \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/vdsina\/blog\/497170\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gy\/oj\/kc\/gyojkcenpjdc6jykch_dbns_rhi.jpeg\"><\/p>\n<p>  \u041d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u0431-\u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0441\u0445\u043e\u0434\u0443\u0435\u0442 \u0442\u0435\u0440\u0430\u0431\u0430\u0439\u0442\u044b \u0442\u0440\u0430\u0444\u0438\u043a\u0430. \u041d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0438\u0441\u043b\u0430\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0432 10-20% \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0431\u0435\u0440\u0435\u0447\u044c \u0434\u0435\u043d\u044c\u0433\u0438 \u0438 \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0435 \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u043a\u0432\u043e\u0442\u044b.<br \/>  \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0442\u0440\u0430\u0444\u0438\u043a \u043e\u043f\u0430\u0441\u043d\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u043a \u043b\u0438\u043c\u0438\u0442\u0430\u043c \u0432\u0430\u0448\u0435\u0433\u043e \u0442\u0430\u0440\u0438\u0444\u0430 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 \u0438\u043b\u0438 \u0432\u043e\u0432\u0441\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u043d\u0438\u0445? <\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0435 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435.<a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0421\u043e\u0436\u043c\u0438 \u044d\u0442\u043e!<\/h2>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430 \u0442\u0440\u0430\u0444\u0438\u043a\u0435 \u2014 \u0441\u0436\u0430\u0442\u044c \u0435\u0433\u043e. \u042d\u0442\u043e \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0434\u0430\u043d\u043d\u044b\u0435, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f. \u0412 \u0445\u043e\u0434\u0443 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0441 Deflate, \u043d\u043e \u0435\u0441\u0442\u044c \u0438 \u044d\u043a\u0437\u043e\u0442\u0438\u043a\u0430.<\/p>\n<h3>Gzip<\/h3>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0436\u0430\u0442\u0438\u044f. \u0421\u0436\u0438\u043c\u0430\u0435\u0442 \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u044c, \u0441 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0441\u0436\u0430\u0442\u0438\u044f (\u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442 1 \u0434\u043e 9, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 6) \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u043e\u0439. \u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439, \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hv\/s5\/gt\/hvs5gtovy-ro0fv3baagtvtexio.png\"><\/p>\n<p>  <b><a href=\"https:\/\/nginx.org\/ru\/docs\/http\/ngx_http_gzip_module.html\">Nginx<\/a><\/b><\/p>\n<pre><code class=\"nginx\">gzip            on; gzip_min_length 1000; gzip_proxied    expired no-cache no-store private auth; gzip_types      text\/plain application\/xml;<\/code><\/pre>\n<p>  <b>Apache<\/b><\/p>\n<pre><code class=\"apache\">AddOutputFilterByType DEFLATE text\/plain AddOutputFilterByType DEFLATE text\/html AddOutputFilterByType DEFLATE text\/xml AddOutputFilterByType DEFLATE text\/css AddOutputFilterByType DEFLATE application\/xml AddOutputFilterByType DEFLATE application\/xhtml+xml AddOutputFilterByType DEFLATE application\/rss+xml AddOutputFilterByType DEFLATE application\/javascript AddOutputFilterByType DEFLATE application\/x-javascript<\/code><\/pre>\n<p>  <\/p>\n<h3>Zopfli<\/h3>\n<p>  \u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 gzip, \u0441\u0436\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 3-8% \u043b\u0443\u0447\u0448\u0435, \u0437\u0430\u0442\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 (\u0440\u0430\u0437\u0436\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e). \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Deflate, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 100% \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 zlib, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u0442\u043e\u0436\u0435 \u043f\u043e\u043b\u043d\u0430\u044f.<\/p>\n<pre><code class=\"bash\">git clone https:\/\/code.google.com\/p\/zopfli\/ cd zopfli make<\/code><\/pre>\n<p>  <b><a href=\"http:\/\/nginx.org\/en\/docs\/http\/ngx_http_gzip_static_module.html\">Nginx<\/a><\/b><\/p>\n<pre><code class=\"nginx\">gzip_static     on;<\/code><\/pre>\n<p>  <\/p>\n<h3>Brotli<\/h3>\n<p>  \u041a\u0430\u043a \u0438 Zopfli, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 \u0413\u0443\u0433\u043b\u0430. \u0423\u043c\u0435\u0435\u0442 \u0441\u0436\u0438\u043c\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0442\u0430\u0442\u0438\u043a\u0435, \u043d\u043e \u0438 \u043d\u0430 \u043b\u0435\u0442\u0443, \u043a\u0430\u043a gzip. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0449\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044b \u0432 \u0442\u0435\u043a\u0441\u0442\u0435, \u043d\u043e \u0438 \u0441\u0440\u0430\u0437\u0443 \u043c\u0430\u043f\u0438\u0442 \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0441\u043b\u043e\u0432\u0430\u0440\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0433\u043e\u0432 \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043a\u043e\u0434\u043e\u0432\u044b\u0445 \u0444\u0440\u0430\u0437, \u0447\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0434\u043b\u044f \u0441\u0436\u0430\u0442\u0438\u044f html\/css\/js: \u0435\u0441\u043b\u0438 Zopfli \u0434\u0430\u0451\u0442 \u043e\u043a\u043e\u043b\u043e 8% \u0441\u0436\u0430\u0442\u0438\u044f \u043f\u043e\u0441\u043b\u0435 gzip, \u0442\u043e Brotli \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043d\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u0435\u0449\u0451 \u043e\u043a\u043e\u043b\u043e 10-15%, \u0430 \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0438 \u0432\u043e\u0432\u0441\u0435 23%! \u0417\u0430\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 https \u0438 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 zlib\/deflate. Caniuse \u043e\u0431\u043d\u0430\u0434\u0451\u0436\u0438\u0432\u0430\u0435\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/54\/ys\/6p\/54ys6p02yvshhjwrhws_8qfhjww.png\"><\/p>\n<p>  <b>Nginx<\/b><\/p>\n<p>  \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Plus, \u043e\u0431\u044b\u0447\u043d\u044b\u0439 Nginx \u043d\u0430\u0434\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c (<b>&#8212;add-module=\/path\/to\/ngx_brotli<\/b>):<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/google\/ngx_brotli.git git clone https:\/\/github.com\/bagder\/libbrotli.git .\/autogen.sh .\/configure make <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\"> cd \/path\/to\/nginx .\/configure --prefix=\/etc\/nginx --sbin-path=\/usr\/sbin\/nginx --modules-path=\/usr\/lib\/nginx\/modules --conf-path=\/etc\/nginx\/nginx.conf --error-log-path=\/var\/log\/nginx\/error.log --http-log-path=\/var\/log\/nginx\/access.log --pid-path=\/var\/run\/nginx.pid --lock-path=\/var\/run\/nginx.lock --http-client-body-temp-path=\/var\/cache\/nginx\/client_temp --http-proxy-temp-path=\/var\/cache\/nginx\/proxy_temp --http-fastcgi-temp-path=\/var\/cache\/nginx\/fastcgi_temp --http-uwsgi-temp-path=\/var\/cache\/nginx\/uwsgi_temp --http-scgi-temp-path=\/var\/cache\/nginx\/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed' --add-module=\/path\/to\/ngx_brotli make<\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0433:<\/p>\n<pre><code class=\"nginx\">brotli_static\ton;<\/code><\/pre>\n<p>  \u0412 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435:<\/p>\n<pre><code class=\"nginx\">brotli\t\ton; brotli_comp_level\t6; brotli_types\ttext\/plain text\/css text\/xml application\/x-javascript;<\/code><\/pre>\n<p>  <b>Apache<\/b><\/p>\n<p>  \u0422\u0443\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0449\u0435, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <b>mod_brotli<\/b> \u0438 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c:<\/p>\n<pre><code class=\"apache\">&lt;IfModule brotli_module&gt;  BrotliCompressionLevel 10  BrotliWindowSize 22  AddOutputFilterByType BROTLI text\/html text\/plain text\/css text\/xml  AddOutputFilterByType BROTLI text\/css  AddOutputFilterByType BROTLI application\/x-javascript application\/javascript  AddOutputFilterByType BROTLI application\/rss+xml  AddOutputFilterByType BROTLI application\/xml  AddOutputFilterByType BROTLI application\/json  &lt;\/IfModule&gt;<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0417\u0430\u043a\u044d\u0448\u0438\u0440\u0443\u0439 \u044d\u0442\u043e!<\/h2>\n<p>  \u0420\u0430\u0437\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e, \u0441\u0432\u0435\u0434\u044f \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0431\u044b\u043b \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d, \u0442\u043e \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. <\/p>\n<p>  HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 Cache-control, Expires \u0438 Vary \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0433\u0438\u0431\u043a\u0443\u044e \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0445\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0438 \u0432 \u043b\u043e\u0431 \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u044e\u0434\u0443 max-age=2592000.<\/p>\n<p>  <b>Nginx<\/b><\/p>\n<pre><code class=\"nginx\">location ~* ^.+\\.(js|css)$ { \texpires max; }<\/code><\/pre>\n<p>  <b>Apache<\/b><\/p>\n<pre><code class=\"apache\">&lt;ifModule mod_headers.c&gt;     &lt;FilesMatch &quot;\\.(html|htm)$&quot;&gt;         Header set Cache-Control &quot;max-age=43200&quot;     &lt;\/FilesMatch&gt;     &lt;FilesMatch &quot;\\.(js|css|txt)$&quot;&gt;         Header set Cache-Control &quot;max-age=604800&quot;     &lt;\/FilesMatch&gt;     &lt;FilesMatch &quot;\\.(flv|swf|ico|gif|jpg|jpeg|png)$&quot;&gt;         Header set Cache-Control &quot;max-age=2592000&quot;     &lt;\/FilesMatch&gt;     &lt;FilesMatch &quot;\\.(pl|php|cgi|spl|scgi|fcgi)$&quot;&gt;         Header unset Cache-Control     &lt;\/FilesMatch&gt; &lt;\/IfModule&gt; &lt;ifModule mod_expires.c&gt;     ExpiresActive On     ExpiresDefault &quot;access plus 5 seconds&quot;     ExpiresByType image\/x-icon &quot;access plus 2592000 seconds&quot;     ExpiresByType image\/jpeg &quot;access plus 2592000 seconds&quot;     ExpiresByType image\/png &quot;access plus 2592000 seconds&quot;     ExpiresByType image\/gif &quot;access plus 2592000 seconds&quot;     ExpiresByType application\/x-shockwave-flash &quot;access plus 2592000 seconds&quot;     ExpiresByType text\/css &quot;access plus 604800 seconds&quot;     ExpiresByType text\/javascript &quot;access plus 604800 seconds&quot;     ExpiresByType application\/javascript &quot;access plus 604800 seconds&quot;     ExpiresByType application\/x-javascript &quot;access plus 604800 seconds&quot;     ExpiresByType text\/html &quot;access plus 43200 seconds&quot;     ExpiresByType application\/xhtml+xml &quot;access plus 600 seconds&quot; &lt;\/ifModule&gt;<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438 \u044d\u0442\u043e!<\/h2>\n<p>  \u0425\u043e\u0440\u043e\u0448\u0438\u0439 CDN \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0435\u043d\u0435\u0433, \u043d\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0445\u0432\u0430\u0442\u0438\u0442 \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e. \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0442\u044f\u0436\u0435\u043b\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 CDN \u043c\u043e\u0436\u0435\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437! \u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0435\u043d\u0435\u0431\u0440\u0435\u0433\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u043d\u043e-\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430. \u041e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0441 \u0442\u043e\u043f\u0430\u043c\u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u043e, \u043d\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0442\u0430\u0432\u044f\u0442 Cloudflare. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ks\/_j\/tn\/ks_jtndtvc41kcajrzrlqummtxa.png\"><\/p>\n<p>  \u0410 \u0435\u0449\u0451 \u0443 \u043d\u0438\u0445 \u0436\u0435 \u0435\u0441\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 Service Workers, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0439 CDN \u0441 \u043f\u0440\u0435\u0444\u0435\u0440\u0430\u043d\u0441\u043e\u043c \u0438 \u043a\u0443\u0440\u0442\u0438\u0437\u0430\u043d\u043a\u0430\u043c\u0438. \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043c\u0430\u043b\u043e, \u043d\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u0435\u0441\u0442\u044c \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u0442\u0430\u043b\u0435 SW.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0451 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0445\u043e\u0442\u044f \u0431\u044b gzip \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0437\u0434\u0435\u0441\u044c \u0431\u043e\u043b\u0435\u0435 80% \u0441\u0430\u0439\u0442\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043d\u0438\u043c. \u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0441\u0436\u0430\u0442\u0438\u044f \u0438 -9 \u0432\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 Brotli \u0441 \u0431\u044d\u043a\u0430\u043f\u043e\u043c \u0432 \u0432\u0438\u0434\u0435 Zopfli (\u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u0431\u0440\u043e\u0442\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435\u0442 100% \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f). \u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043a\u0443\u0447\u0443 \u0442\u0440\u0430\u0444\u0438\u043a\u0430:<\/p>\n<ul>\n<li><b>gzip: 50-95% \u0441\u0436\u0430\u0442\u0438\u044f<\/b> \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u0412 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043f\u043e \u0432\u0435\u0431\u0443 65-80%<\/li>\n<li><b>Zopfli: +3-8% \u0441\u0436\u0430\u0442\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e gzip<\/b> \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c, \u043d\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u0438 10%<\/li>\n<li><b>Brotli: +10-15% \u0441\u0436\u0430\u0442\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e gzip<\/b> \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 c \u0440\u0435\u0434\u043a\u0438\u043c\u0438 \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430\u043c\u0438 \u0434\u043e 20% \u0438 \u0432\u044b\u0448\u0435<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zc\/1z\/zu\/zc1zzucnyztq_ywwlcedtcc9jwk.png\" alt=\"image\"><\/p>\n<p>  <b>\u041a\u044d\u0448\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/b> \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u044d\u0442\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0437\u0430\u0445\u043e\u0434\u0430\u0445 \u043d\u0430 99% \u0438 \u043d\u0438\u0436\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435.<\/p>\n<p>  <b>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 CDN<\/b> \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0438 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0443\u0434\u0430\u0440 \u0431\u0435\u0440\u0451\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f \u0440\u0430\u0437\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0434\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0442\u0440\u0430\u0444\u0438\u043a \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u044b. \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0435\u0442\u0438, \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>  \u0412\u0441\u0451 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u0440\u0430\u0442\u0447\u0430\u0439\u0448\u0438\u0435 \u0441\u0440\u043e\u043a\u0438 \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0447\u0442\u043e \u0434\u0430\u0451\u0442 \u0432\u0430\u043c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0435\u0451 \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0421\u0436\u0438\u043c\u0430\u0439\u0442\u0435, \u043a\u044d\u0448\u0438\u0440\u0443\u0439\u0442\u0435, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0439\u0442\u0435, \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u044c\u0442\u0435 \u0441\u0432\u043e\u0438 \u0437\u0430\u0442\u0440\u0430\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0434\u0435\u043d\u044c\u0433\u0438.<\/p>\n<p>  <a href=\"https:\/\/vdsina.ru\/eternal-server?partner=habr6\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/od\/fm\/wa\/odfmwacxus3phgvaxyooajzkns4.png\"><\/a><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/vdsina\/blog\/497170\/\"> https:\/\/habr.com\/ru\/company\/vdsina\/blog\/497170\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/vdsina\/blog\/497170\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gy\/oj\/kc\/gyojkcenpjdc6jykch_dbns_rhi.jpeg\"><\/p>\n<p>  \u041d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u0431-\u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0430\u0441\u0445\u043e\u0434\u0443\u0435\u0442 \u0442\u0435\u0440\u0430\u0431\u0430\u0439\u0442\u044b \u0442\u0440\u0430\u0444\u0438\u043a\u0430. \u041d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0438\u0441\u043b\u0430\u0445 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0432 10-20% \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0431\u0435\u0440\u0435\u0447\u044c \u0434\u0435\u043d\u044c\u0433\u0438 \u0438 \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0435 \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u043a\u0432\u043e\u0442\u044b.<br \/>  \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0442\u0440\u0430\u0444\u0438\u043a \u043e\u043f\u0430\u0441\u043d\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u043a \u043b\u0438\u043c\u0438\u0442\u0430\u043c \u0432\u0430\u0448\u0435\u0433\u043e \u0442\u0430\u0440\u0438\u0444\u0430 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 \u0438\u043b\u0438 \u0432\u043e\u0432\u0441\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u043d\u0438\u0445? <\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0435 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-301931","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=301931"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301931\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=301931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=301931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=301931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}