{"id":187008,"date":"2013-07-18T13:23:05","date_gmt":"2013-07-18T09:23:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=187008"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=187008","title":{"rendered":"<span class=\"post_title\">HTML5\/AngularJS\/Nginx \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0441 google-\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 web-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c ui \u0438 backend \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430 \u0443\u0437\u043a\u043e\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 frontend \u0438 backend \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u0412\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a\u0430\u043a \u043e \u0441\u043b\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u043e \u0441\u043b\u043e\u0435 \u043b\u043e\u0433\u0438\u043a\u0438. \u0415\u0441\u043b\u0438 ui-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u043d\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u0438 \u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u044d\u0442\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0443\u0434\u0430\u0447\u0430. \u0412 \u043f\u043b\u043e\u0445\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 ui-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043b\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 javascript \u0444\u0430\u0439\u043b\u0435, \u0438\u043b\u0438 \u0437\u043d\u0430\u0442\u044c \u043e \u044f\u0437\u044b\u043a\u0435 jsp \u0444\u0430\u0439\u043b\u043e\u0432 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 html \u0444\u0430\u0439\u043b\u043e\u0432 \u0442\u0430\u043a-\u0436\u0435 \u043f\u0430\u0433\u0443\u0431\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0441\u0435\u0442\u0438. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/e6d\/968\/6e3\/e6d9686e32200410db234bd72297ce21.png\" alt=\"non-ajax\"\/><\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 HTML5, WebSocket \u0438 Full Ajax \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u0431\u0438\u0432\u0430\u0442\u044c backend-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0447\u0435\u043c-\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u043e\u0442 \u0431\u0438\u0437\u043d\u0435\u0441 \u043b\u043e\u0433\u0438\u043a\u0438. \u0412\u0441\u044f ui-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0441\u0442\u0438\u0441\u044c \u043d\u0430 nginx \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430\u043c\u0438 api \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u0410 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u0430\u0432\u0442\u043e-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0438 ui, \u0438 backend \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044e. \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043e\u0434\u043d\u0438\u0445 \u043b\u0438\u0448\u044c json \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043d\u0438\u0437\u0438\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u0435\u0434\u044c \u0441\u0436\u0430\u0442\u044b\u0439 javascript \u043a\u043e\u0434 ui-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u043a\u0435\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041d\u043e \u0435\u0441\u043b\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u0440\u0430\u0437\u0443\u0435\u0440\u044b \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u0441\u043f\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u0441 \u0432\u043e\u0437\u0440\u043e\u0441\u0448\u0435\u0439 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u0442\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 angularjs \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0449\u0438:<\/p>\n<ul>\n<li>sitemap.xml<\/li>\n<li>html5Mode<\/li>\n<li>nginx<\/li>\n<li>old fashion backend server<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/26d\/f00\/dcc\/26df00dcc1c0b1758953279174c9f1a3.png\" alt=\"image\"\/><\/p>\n<h5>HTML5 mode<\/h5>\n<p>  Html5 mode \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 angularjs routes \u0438\u0437 \u0432\u0438\u0434\u0430 <code>example.com\/#!\/home<\/code> \u0432 \u0432\u0438\u0434 <code>example.com\/home<\/code> (\u0432\u0441\u0435 <code>href<\/code> \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 url \u0431\u0435\u0437 hashbang). \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c html5mode \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<\/p>\n<pre><code class=\"javascript\">$locationProvider.html5Mode(true); $locationProvider.hashPrefix('!'); <\/code><\/pre>\n<p>  <i>\u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e <code>!<\/code> \u0434\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438, \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u043c\u0438 javascript<\/i><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 nginx \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 <code>example.com\/home<\/code> \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 <code>index.html<\/code> \u0444\u0430\u0439\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u043a\u0430\u0436\u0435\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443:<\/p>\n<pre><code>location \/ {         expires -1;         add_header Pragma &quot;no-cache&quot;;         add_header Cache-Control &quot;no-store, no-cache, must-revalidate, post-check=0, pre-check=0&quot;;         root \/var\/web;         try_files $uri $uri\/ \/index.html =404;     } <\/code><\/pre>\n<p>  \u0421\u0442\u0440\u043e\u043a\u0430 <code>try_files $uri $uri\/ \/index.html =404;<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 url \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u044b \u043d\u0430 <code>index.html<\/code> \u0444\u0430\u0439\u043b, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c url \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. <br \/>  <i>\u042d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u043c (\u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c \u0441 \u0441\u0442\u0430\u0440\u044b\u043c hashbang \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0441\u0441\u044b\u043b\u043e\u043a) \u0438 \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c.<\/i><\/p>\n<h5>SEO<\/h5>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0434\u043b\u044f \u0431\u043e\u0442\u0430 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c snapshot \u0441\u0442\u0440\u0430\u043d\u0438\u0446. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0435\u043c\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>sitemap.xml<\/code> \u0444\u0430\u0439\u043b\u0430. \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0444\u0430\u0439\u043b\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0434\u0430\u0442\u044b \u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f (\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0435\u0441\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"http:\/\/www.sitemaps.org\/\">www.sitemaps.org\/<\/a>):<\/p>\n<pre><code class=\"xml\">&lt;urlset xmlns='http:\/\/www.sitemaps.org\/schemas\/sitemap\/0.9'&gt;   &lt;url&gt;     &lt;loc&gt;http:\/\/senior-java-developer.com\/java\/basics&lt;\/loc&gt;     &lt;lastmod&gt;2013-07-12&lt;\/lastmod&gt;   &lt;\/url&gt;   &lt;url&gt;     &lt;loc&gt;http:\/\/senior-java-developer.com\/&lt;\/loc&gt;     &lt;lastmod&gt;2013-07-12&lt;\/lastmod&gt;   &lt;\/url&gt; &lt;\/urlset&gt; <\/code><\/pre>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 <code>index.html<\/code> \u0442.\u043a. \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 javascript \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u0431\u043e\u0442\u044b \u043d\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043e. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0431\u043e\u0442\u0443 \u0447\u0442\u043e \u0437\u0430 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u0439 `index.html` \u0441\u043f\u0440\u044f\u0442\u0430\u043d \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c:<\/p>\n<pre><code class=\"html\">&lt;meta name=&quot;fragment&quot; content=&quot;!&quot; \/&gt; <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0434\u0430\u0441\u0442 \u0431\u043e\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433. \u0423\u0432\u0438\u0434\u0435\u0432 <code>fragmet=!<\/code> \u0431\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0435\u0449\u0435 \u0440\u0430\u0437, \u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446 url \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>?_escaped_fragment_=<\/code>. \u041f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u043c nginx \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u0435\u0441\u0442\u043e:<\/p>\n<pre><code>if ($args ~ &quot;_escaped_fragment_=(.*)&quot;) { \trewrite ^ \/snapshot${uri}; }\t\t location \/snapshot {     proxy_pass http:\/\/api;     proxy_connect_timeout  60s; } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u0431\u043e\u0442\u0430 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u043a api backend \u0441\u0435\u0440\u0432\u0435\u0440\u0443.<\/p>\n<table>\n<tr>\n<td><b>Real url<\/b><\/td>\n<td><b>Bot url<\/b><\/td>\n<td><b>Backend url<\/b><\/td>\n<\/tr>\n<tr>\n<td><code>example.com<\/code><\/td>\n<td><code>example.com\/?_escaped_fragment_=<\/code><\/td>\n<td><code>localhost:8080\/snapshot\/<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>example.com\/home<\/code><\/td>\n<td><code>example.com\/home?_escaped_fragment_=<\/code><\/td>\n<td><code>localhost:8080\/snapshot\/home<\/code><\/td>\n<\/tr>\n<\/table>\n<p>  \u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e thymeleaf. \u0422.\u043a. \u0438 thymeleaf, \u0438 angularjs \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 html5 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u043d\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0438\u0445.<\/p>\n<p>  \u0421\u0442\u0440\u043e\u0447\u043a\u0430 \u0438\u0437 html view \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0431\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: <\/p>\n<pre><code class=\"html\">&lt;div ng-bind=&quot;text&quot; th:text=&quot;${text}&quot;&gt;&lt;\/div&gt; <\/code><\/pre>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/187008\/\"> http:\/\/habrahabr.ru\/post\/187008\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 web-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c ui \u0438 backend \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430 \u0443\u0437\u043a\u043e\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 frontend \u0438 backend \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u0412\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a\u0430\u043a \u043e \u0441\u043b\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u043e \u0441\u043b\u043e\u0435 \u043b\u043e\u0433\u0438\u043a\u0438. \u0415\u0441\u043b\u0438 ui-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u043d\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440, \u0438 \u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u044d\u0442\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0443\u0434\u0430\u0447\u0430. \u0412 \u043f\u043b\u043e\u0445\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 ui-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u043b\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 javascript \u0444\u0430\u0439\u043b\u0435, \u0438\u043b\u0438 \u0437\u043d\u0430\u0442\u044c \u043e \u044f\u0437\u044b\u043a\u0435 jsp \u0444\u0430\u0439\u043b\u043e\u0432 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 html \u0444\u0430\u0439\u043b\u043e\u0432 \u0442\u0430\u043a-\u0436\u0435 \u043f\u0430\u0433\u0443\u0431\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0441\u0435\u0442\u0438. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/e6d\/968\/6e3\/e6d9686e32200410db234bd72297ce21.png\" alt=\"non-ajax\"\/><\/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-187008","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/187008","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=187008"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/187008\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=187008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=187008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=187008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}