{"id":7936,"date":"2026-09-23T09:00:00","date_gmt":"2026-09-23T09:00:00","guid":{"rendered":"https:\/\/otus.ru\/journal\/?p=7936"},"modified":"2026-09-25T15:33:57","modified_gmt":"2026-09-25T15:33:57","slug":"push-tehnologii","status":"publish","type":"post","link":"https:\/\/otus.ru\/journal\/push-tehnologii\/","title":{"rendered":"Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 APNs, FCM \u0438 Web Push"},"content":{"rendered":"<p><strong>Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435<\/strong> &#8212; \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0447\u0435\u0440\u0435\u0437 push-\u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b (Apple, Google \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430), \u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0432\u043a\u043b\u0430\u0434\u043a\u0430 \u0441\u0430\u0439\u0442\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u044b (\u0434\u043b\u044f Web Push \u0441\u0430\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u0432 \u0444\u043e\u043d\u0435). \u041d\u0438\u0436\u0435 &#8212; \u0441\u0445\u0435\u043c\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438, \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 APNs, FCM \u0438 Web Push, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0432\u043a\u043b\u044e\u0447\u0430\u044f Android 13+) \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 Web Push \u043d\u0430 Node.js.<\/p>\n<div class=\"oj-toc\" style=\"background:#f6f6f6;border-radius:8px;padding:14px 20px;margin:20px 0\">\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/strong><\/p>\n<ol>\n<li><a href=\"#s1\">\u0427\u0435\u0442\u044b\u0440\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0443\u0442\u0430\u044e\u0442<\/a><\/li>\n<li><a href=\"#s2\">\u041a\u0430\u043a \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435: \u0441\u0445\u0435\u043c\u0430 \u043f\u043e \u0448\u0430\u0433\u0430\u043c<\/a><\/li>\n<li><a href=\"#s3\">APNs, FCM \u0438 Web Push: \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/a><\/li>\n<li><a href=\"#s4\">\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/a><\/li>\n<li><a href=\"#s5\">Web Push \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435: \u043e\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438<\/a><\/li>\n<li><a href=\"#s6\">\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/a><\/li>\n<li><a href=\"#s7\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0441\u0442\u044c<\/a><\/li>\n<li><a href=\"#s8\">\u0415\u0441\u043b\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442<\/a><\/li>\n<li><a href=\"#s9\">\u0412\u044b\u0432\u043e\u0434\u044b<\/a><\/li>\n<li><a href=\"#s10\">\u0413\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \/ \u0441\u0432\u044f\u0437\u044c \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439<\/a><\/li>\n<li><a href=\"#s11\">FAQ<\/a><\/li>\n<\/ol>\n<\/div>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d \u043d\u0430 Node.js 24.21 \u0438 22.23 23 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f 2026 \u0433\u043e\u0434\u0430.<\/p>\n<h2 id=\"s1\">\u0427\u0435\u0442\u044b\u0440\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0443\u0442\u0430\u044e\u0442<\/h2>\n<ul>\n<li><strong>Push-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435<\/strong> &#8212; \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043b push-\u0441\u0435\u0440\u0432\u0438\u0441. \u041c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0439\u0442\u0438 \u0431\u0435\u0437 \u043f\u043e\u043a\u0430\u0437\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 (\u0441\u0438\u0433\u043d\u0430\u043b \u00ab\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0439 \u0447\u0430\u0442\u00bb).<\/li>\n<li><strong>\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435<\/strong> &#8212; \u0442\u043e, \u0447\u0442\u043e \u0432\u0438\u0434\u0438\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c: \u0431\u0430\u043d\u043d\u0435\u0440, \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0448\u0442\u043e\u0440\u043a\u0435, \u0437\u0432\u0443\u043a. \u0415\u0433\u043e \u0440\u0438\u0441\u0443\u0435\u0442 \u041e\u0421 \u0438\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440.<\/li>\n<li><strong>Push-\u0441\u0435\u0440\u0432\u0438\u0441<\/strong> &#8212; \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c: APNs \u0443 Apple, Firebase Cloud Messaging (FCM) \u0443 Android \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 Google, \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 (\u0443 Safari &#8212; APNs).<\/li>\n<li><strong>\u0410\u0434\u0440\u0435\u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/strong> &#8212; \u0442\u043e\u043a\u0435\u043d (APNs, FCM) \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0441 URL endpoint (Web Push): \u043a\u043e\u043c\u0443 \u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.<\/li>\n<\/ul>\n<p>Push &#8212; \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438, \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 &#8212; \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043a\u0430\u0437\u0430. \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 (\u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435, \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0441\u0430\u043c\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c) \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u0435\u0437 push-\u0441\u0435\u0440\u0432\u0438\u0441\u0430.<\/p>\n<h2 id=\"s2\">\u041a\u0430\u043a \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435: \u0441\u0445\u0435\u043c\u0430 \u043f\u043e \u0448\u0430\u0433\u0430\u043c<\/h2>\n<ol>\n<li>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<\/li>\n<li>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 push-\u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u043e\u043a\u0435\u043d \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443.<\/li>\n<li>\u041a\u043b\u0438\u0435\u043d\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u043a\u0435\u043d \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u043e\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u0437\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/li>\n<li>\u041f\u0440\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0438 (\u043e\u043f\u043b\u0430\u0442\u0430 \u043f\u0440\u043e\u0448\u043b\u0430, \u043f\u0440\u0438\u0448\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435) \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 push-\u0441\u0435\u0440\u0432\u0438\u0441 \u0430\u0434\u0440\u0435\u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438.<\/li>\n<li>Push-\u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u0436\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e \u0438\u043b\u0438 \u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u043f\u043e\u043a\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u0442 \u0432 \u0441\u0435\u0442\u044c, \u043d\u043e \u043d\u0435 \u0434\u043e\u043b\u044c\u0448\u0435 \u0441\u0440\u043e\u043a\u0430 \u0436\u0438\u0437\u043d\u0438 (TTL).<\/li>\n<li>\u041e\u0421 \u0438\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u0431\u043e \u0431\u0443\u0434\u0438\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 service worker, \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0442 \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c.<\/li>\n<\/ol>\n<p>\u0417\u0430\u0440\u044f\u0434 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u0441\u044f \u043d\u0430 \u0448\u0430\u0433\u0435 5: \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u043d\u043e \u043e\u0431\u0449\u0435\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u043f\u0440\u043e\u0441\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h2 id=\"s3\">APNs, FCM \u0438 Web Push: \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/h2>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>APNs (Apple)<\/th>\n<th>FCM (Google)<\/th>\n<th>Web Push (\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u0413\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/td>\n<td>iOS, iPadOS, macOS, watchOS, tvOS, visionOS<\/td>\n<td>Android \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 Google; \u043d\u0430 iOS \u0438 \u0432 \u0432\u0435\u0431\u0435 SDK Firebase \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 APNs \u0438 Web Push<\/td>\n<td>Chrome, Edge, Firefox, Safari<\/td>\n<\/tr>\n<tr>\n<td>\u0410\u0434\u0440\u0435\u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/td>\n<td>device token<\/td>\n<td>registration token<\/td>\n<td>\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430: endpoint + \u043a\u043b\u044e\u0447\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">p256dh<\/code> \u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">auth<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u041a\u0430\u043a \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438<\/td>\n<td>JWT, \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447\u043e\u043c <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">.p8<\/code>, \u0438\u043b\u0438 TLS-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442<\/td>\n<td>OAuth 2.0 \u0442\u043e\u043a\u0435\u043d \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 (HTTP v1 API)<\/td>\n<td>JWT \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 VAPID (RFC 8292)<\/td>\n<\/tr>\n<tr>\n<td>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b<\/td>\n<td>HTTP\/2<\/td>\n<td>HTTPS, JSON<\/td>\n<td>HTTP (RFC 8030), \u0442\u0435\u043b\u043e \u0448\u0438\u0444\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e RFC 8291<\/td>\n<\/tr>\n<tr>\n<td>\u041b\u0438\u043c\u0438\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/td>\n<td>4096 \u0431\u0430\u0439\u0442 (VoIP &#8212; 5120)<\/td>\n<td>4096 \u0431\u0430\u0439\u0442 (\u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Firebase &#8212; 1000 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432)<\/td>\n<td>\u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0431\u044f\u0437\u0430\u043d \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0442\u0435\u043b\u043e \u0434\u043e 4096 \u0431\u0430\u0439\u0442 \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435; \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u043e\u043b\u043e 3,9 \u041a\u0411<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 push \u043a\u043b\u0430\u0434\u0443\u0442 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0442\u0435\u043a\u0441\u0442 \u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u0430\u043c\u043e.<\/p>\n<p>\u0423 FCM \u0441\u0442\u0430\u0440\u044b\u0435 HTTP \u0438 XMPP API \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c (<code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Authorization: key=...<\/code>) \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c\u0438 20 \u0438\u044e\u043d\u044f 2023 \u0433\u043e\u0434\u0430, \u0438\u0445 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c 22 \u0438\u044e\u043b\u044f 2024 \u0433\u043e\u0434\u0430. \u041a\u043e\u0434 \u0438\u0437 \u0441\u0442\u0430\u0440\u044b\u0445 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0443\u0436\u0435\u043d HTTP v1 \u0441 OAuth-\u0442\u043e\u043a\u0435\u043d\u043e\u043c.<\/p>\n<p>\u041d\u0430 Android \u0431\u0435\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 Google (\u0447\u0430\u0441\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 Huawei, \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u044b \u0432\u043d\u0435 Google Play) FCM \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 push-\u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0442\u0430 \u0436\u0435: \u0442\u043e\u043a\u0435\u043d, \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a.<\/p>\n<h2 id=\"s4\">\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h2>\n<p>\u041d\u0430 Android \u0438 iOS \u0431\u0435\u0437 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0439\u0434\u0435\u0442, \u043d\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f. \u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0431\u0435\u0437 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c, \u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0442.<\/p>\n<table>\n<thead>\n<tr>\n<th>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430<\/th>\n<th>\u041a\u0430\u043a \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442<\/th>\n<th>\u0412\u0430\u0436\u043d\u0430\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Android 13+ (API 33)<\/td>\n<td>runtime-\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">POST_NOTIFICATIONS<\/code><\/td>\n<td>\u0434\u043e Android 13 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0431\u044b\u043b\u043e, \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e; \u043f\u0440\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">targetSdk<\/code> 32 \u0438 \u043d\u0438\u0436\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0430\u043c\u0430 \u0441\u043f\u0440\u043e\u0441\u0438\u0442 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430; \u0441 Android 8 \u043a\u0430\u043d\u0430\u043b\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/td>\n<\/tr>\n<tr>\n<td>iOS, iPadOS<\/td>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">UNUserNotificationCenter.requestAuthorization<\/code><\/td>\n<td>\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0434\u0438\u0430\u043b\u043e\u0433 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445<\/td>\n<\/tr>\n<tr>\n<td>\u0411\u0440\u0430\u0443\u0437\u0435\u0440<\/td>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Notification.requestPermission()<\/code><\/td>\n<td>\u0440\u044f\u0434 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043a\u043b\u0438\u043a)<\/td>\n<\/tr>\n<tr>\n<td>Safari \u043d\u0430 iPhone \u0438 iPad<\/td>\n<td>\u043a\u0430\u043a \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e<\/td>\n<td>Web Push \u0441 iOS \u0438 iPadOS 16.4 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u00ab\u0414\u043e\u043c\u043e\u0439\u00bb (\u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">display: standalone<\/code> \u0438\u043b\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">fullscreen<\/code>)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0430 Kotlin (AndroidX Activity). \u0412 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">AndroidManifest.xml<\/code> \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">&lt;uses-permission android:name=\"android.permission.POST_NOTIFICATIONS\" \/&gt;<\/code>, \u0430 \u0432 \u043a\u043e\u0434\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">import<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">android.Manifest<\/span>\n<span style=\"color: #C678DD\">import<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">android.content.pm.PackageManager<\/span>\n<span style=\"color: #C678DD\">import<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">android.os.Build<\/span>\n<span style=\"color: #C678DD\">import<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">androidx.activity.ComponentActivity<\/span>\n<span style=\"color: #C678DD\">import<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">androidx.activity.result.contract.ActivityResultContracts<\/span>\n<span style=\"color: #C678DD\">import<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">androidx.core.content.ContextCompat<\/span>\n\n<span style=\"color: #C678DD\">class<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">MainActivity<\/span><span style=\"color: #ABB2BF\"> : <\/span><span style=\"color: #E06C75\">ComponentActivity<\/span><span style=\"color: #ABB2BF\">() {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">private<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">val<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">requestPermission<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #E06C75\">registerForActivityResult<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">ActivityResultContracts<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">RequestPermission<\/span><span style=\"color: #ABB2BF\">()) { <\/span><span style=\"color: #E06C75\">granted<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">-&gt;<\/span>\n<span style=\"color: #ABB2BF\">            <\/span><span style=\"color: #C678DD\">if<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #56B6C2\">!<\/span><span style=\"color: #E06C75\">granted<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">                <\/span><span style=\"color: #7F848E\">\/\/ \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439<\/span>\n<span style=\"color: #ABB2BF\">            }<\/span>\n<span style=\"color: #ABB2BF\">        }<\/span>\n\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #C678DD\">private<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">fun<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #61AFEF; font-weight: bold\">askNotificationsIfNeeded<\/span><span style=\"color: #ABB2BF\">() {<\/span>\n<span style=\"color: #ABB2BF\">        <\/span><span style=\"color: #C678DD\">if<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">Build<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">VERSION<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">SDK_INT<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">&gt;=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">Build<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">VERSION_CODES<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">TIRAMISU<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">&amp;&amp;<\/span>\n<span style=\"color: #ABB2BF\">            <\/span><span style=\"color: #E06C75\">ContextCompat<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">checkSelfPermission<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #C678DD\">this<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">Manifest<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">permission<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">POST_NOTIFICATIONS<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">                <\/span><span style=\"color: #56B6C2\">!=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">PackageManager<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">PERMISSION_GRANTED<\/span>\n<span style=\"color: #ABB2BF\">        ) {<\/span>\n<span style=\"color: #ABB2BF\">            <\/span><span style=\"color: #E06C75\">requestPermission<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">launch<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">Manifest<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">permission<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">POST_NOTIFICATIONS<\/span><span style=\"color: #ABB2BF\">)<\/span>\n<span style=\"color: #ABB2BF\">        }<\/span>\n<span style=\"color: #ABB2BF\">    }<\/span>\n<span style=\"color: #ABB2BF\">}<\/span><\/code><\/pre>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">askNotificationsIfNeeded()<\/code> \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435, \u0430 \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430. \u041e\u0442\u043a\u0430\u0437 &#8212; \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439.<\/p>\n<h2 id=\"s5\">Web Push \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435: \u043e\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438<\/h2>\n<h3>\u0428\u0430\u0433 1. \u041a\u043b\u044e\u0447\u0438 VAPID \u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/h3>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 Node.js \u0431\u0435\u0437 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432: \u043f\u0430\u0440\u0430 \u043a\u043b\u044e\u0447\u0435\u0439 VAPID (\u043a\u0440\u0438\u0432\u0430\u044f P-256) \u0438 JWT \u0434\u043b\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Authorization<\/code> \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a push-\u0441\u0435\u0440\u0432\u0438\u0441\u0443.<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">import<\/span><span style=\"color: #ABB2BF\"> { <\/span><span style=\"color: #E06C75\">generateKeyPairSync<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">sign<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">verify<\/span><span style=\"color: #ABB2BF\"> } <\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'node:crypto'<\/span><span style=\"color: #ABB2BF\">;<\/span>\n\n<span style=\"color: #7F848E\">\/\/ 1. \u041f\u0430\u0440\u0430 \u043a\u043b\u044e\u0447\u0435\u0439 VAPID: \u044d\u043b\u043b\u0438\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u0440\u0438\u0432\u0430\u044f P-256<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> { <\/span><span style=\"color: #E06C75\">publicKey<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">privateKey<\/span><span style=\"color: #ABB2BF\"> } <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">generateKeyPairSync<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'ec'<\/span><span style=\"color: #ABB2BF\">, { <\/span><span style=\"color: #E06C75\">namedCurve<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'P-256'<\/span><span style=\"color: #ABB2BF\"> });<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">jwkPub<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">publicKey<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">export<\/span><span style=\"color: #ABB2BF\">({ <\/span><span style=\"color: #E06C75\">format<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'jwk'<\/span><span style=\"color: #ABB2BF\"> });<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b64u<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">buf<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">Buffer<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">buf<\/span><span style=\"color: #ABB2BF\">).<\/span><span style=\"color: #E06C75\">toString<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'base64url'<\/span><span style=\"color: #ABB2BF\">);<\/span>\n\n<span style=\"color: #7F848E\">\/\/ \u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 \u0432 \u00ab\u0441\u044b\u0440\u043e\u043c\u00bb \u0432\u0438\u0434\u0435: 0x04 || X || Y = 65 \u0431\u0430\u0439\u0442<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">rawPub<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">Buffer<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">concat<\/span><span style=\"color: #ABB2BF\">([<\/span><span style=\"color: #E06C75\">Buffer<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\">([<\/span><span style=\"color: #D19A66\">4<\/span><span style=\"color: #ABB2BF\">]),<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E06C75\">Buffer<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">jwkPub<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">x<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">'base64url'<\/span><span style=\"color: #ABB2BF\">), <\/span><span style=\"color: #E06C75\">Buffer<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">jwkPub<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">y<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">'base64url'<\/span><span style=\"color: #ABB2BF\">)]);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'public key bytes:'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">rawPub<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'private key bytes:'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">Buffer<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">privateKey<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">export<\/span><span style=\"color: #ABB2BF\">({ <\/span><span style=\"color: #E06C75\">format<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'jwk'<\/span><span style=\"color: #ABB2BF\"> }).<\/span><span style=\"color: #E06C75\">d<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">'base64url'<\/span><span style=\"color: #ABB2BF\">).<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">);<\/span>\n\n<span style=\"color: #7F848E\">\/\/ 2. JWT \u0434\u043b\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 Authorization (ES256)<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">endpoint<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'https:\/\/push.example.com\/send\/abc123'<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">header<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> { <\/span><span style=\"color: #E06C75\">typ<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'JWT'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">alg<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'ES256'<\/span><span style=\"color: #ABB2BF\"> };<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">claims<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E06C75\">aud<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">new<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">URL<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">endpoint<\/span><span style=\"color: #ABB2BF\">).<\/span><span style=\"color: #E06C75\">origin<\/span><span style=\"color: #ABB2BF\">,                   <\/span><span style=\"color: #7F848E\">\/\/ origin push-\u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E06C75\">exp<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">Math<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">floor<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E5C07B\">Date<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">now<\/span><span style=\"color: #ABB2BF\">() <\/span><span style=\"color: #56B6C2\">\/<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">1000<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">12<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">*<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">3600<\/span><span style=\"color: #ABB2BF\">,  <\/span><span style=\"color: #7F848E\">\/\/ \u043d\u0435 \u0434\u043e\u043b\u044c\u0448\u0435 24 \u0447\u0430\u0441\u043e\u0432<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E06C75\">sub<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'mailto:admin@example.com'<\/span><span style=\"color: #ABB2BF\">,                 <\/span><span style=\"color: #7F848E\">\/\/ \u043a\u043e\u043d\u0442\u0430\u043a\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f<\/span>\n<span style=\"color: #ABB2BF\">};<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">unsigned<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b64u<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E5C07B\">JSON<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">stringify<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">header<\/span><span style=\"color: #ABB2BF\">)) <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'.'<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b64u<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E5C07B\">JSON<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">stringify<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">claims<\/span><span style=\"color: #ABB2BF\">));<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">sig<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">sign<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'sha256'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">Buffer<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">unsigned<\/span><span style=\"color: #ABB2BF\">), { <\/span><span style=\"color: #E06C75\">key<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">privateKey<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">dsaEncoding<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'ieee-p1363'<\/span><span style=\"color: #ABB2BF\"> });<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">jwt<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">unsigned<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'.'<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b64u<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">sig<\/span><span style=\"color: #ABB2BF\">);<\/span>\n\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'signature bytes:'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">sig<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'aud:'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">claims<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">aud<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'verify:'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">verify<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'sha256'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">Buffer<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">unsigned<\/span><span style=\"color: #ABB2BF\">),<\/span>\n<span style=\"color: #ABB2BF\">  { <\/span><span style=\"color: #E06C75\">key<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">publicKey<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">dsaEncoding<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'ieee-p1363'<\/span><span style=\"color: #ABB2BF\"> }, <\/span><span style=\"color: #E06C75\">sig<\/span><span style=\"color: #ABB2BF\">));<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'Authorization: vapid t='<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">jwt<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">slice<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">20<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'..., k='<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b64u<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">rawPub<\/span><span style=\"color: #ABB2BF\">).<\/span><span style=\"color: #E06C75\">slice<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #D19A66\">12<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'...'<\/span><span style=\"color: #ABB2BF\">);<\/span><\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043a\u0430\u043a <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">vapid.mjs<\/code> \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">node vapid.mjs<\/code>. \u0412\u044b\u0432\u043e\u0434 (\u043a\u043b\u044e\u0447\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435, \u0445\u0432\u043e\u0441\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u043c):<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">public key bytes: 65\nprivate key bytes: 32\nsignature bytes: 64\naud: https:\/\/push.example.com\nverify: true\nAuthorization: vapid t=eyJ0eXAiOiJKV1QiLCJh..., k=BBV32VDHtodV...\n<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 (65 \u0431\u0430\u0439\u0442 \u0432 base64url) \u043e\u0442\u0434\u0430\u0435\u0442\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443 \u043f\u0440\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435, \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 (32 \u0431\u0430\u0439\u0442\u0430) \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435;<\/li>\n<li><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">aud<\/code> &#8212; origin push-\u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438\u0437 endpoint \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u0430 \u043d\u0435 \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430; <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">exp<\/code> &#8212; \u043d\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 24 \u0447\u0430\u0441\u043e\u0432 \u0432\u043f\u0435\u0440\u0435\u0434 (RFC 8292);<\/li>\n<li>JWT \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e, \u043a\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c. \u0422\u0435\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0448\u0438\u0444\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043f\u043e RFC 8291 &#8212; \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u0431\u0435\u0440\u0443\u0442 \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">web-push<\/code> \u0434\u043b\u044f Node.js), \u0430 \u043d\u0435 \u043f\u0438\u0448\u0443\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/li>\n<\/ul>\n<h3>\u0422\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430: \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0432 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435<\/h3>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">sign<\/code> \u0432 Node.js \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u044b\u0434\u0430\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044c ECDSA \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 DER, \u0430 JWT (ES256) \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u00ab\u0441\u044b\u0440\u043e\u0439\u00bb \u0444\u043e\u0440\u043c\u0430\u0442 r||s \u0440\u043e\u0432\u043d\u043e \u0438\u0437 64 \u0431\u0430\u0439\u0442.<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">import<\/span><span style=\"color: #ABB2BF\"> { <\/span><span style=\"color: #E06C75\">generateKeyPairSync<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">sign<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">verify<\/span><span style=\"color: #ABB2BF\"> } <\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'node:crypto'<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> { <\/span><span style=\"color: #E06C75\">publicKey<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">privateKey<\/span><span style=\"color: #ABB2BF\"> } <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">generateKeyPairSync<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'ec'<\/span><span style=\"color: #ABB2BF\">, { <\/span><span style=\"color: #E06C75\">namedCurve<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'P-256'<\/span><span style=\"color: #ABB2BF\"> });<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">Buffer<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'header.claims'<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #7F848E\">\/\/ \u041e\u0448\u0438\u0431\u043a\u0430: \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e - \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 DER<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">der<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">sign<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'sha256'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">privateKey<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'DER length:'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">der<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'verify as JWS:'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">verify<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'sha256'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\">, { <\/span><span style=\"color: #E06C75\">key<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">publicKey<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">dsaEncoding<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'ieee-p1363'<\/span><span style=\"color: #ABB2BF\"> }, <\/span><span style=\"color: #E06C75\">der<\/span><span style=\"color: #ABB2BF\">));<\/span>\n<span style=\"color: #7F848E\">\/\/ \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435: \u0444\u043e\u0440\u043c\u0430\u0442 r||s, \u0440\u043e\u0432\u043d\u043e 64 \u0431\u0430\u0439\u0442\u0430<\/span>\n<span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">jws<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">sign<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'sha256'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\">, { <\/span><span style=\"color: #E06C75\">key<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">privateKey<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">dsaEncoding<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'ieee-p1363'<\/span><span style=\"color: #ABB2BF\"> });<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'JWS length:'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">jws<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #E06C75\">console<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">log<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'verify as JWS:'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">verify<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'sha256'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\">, { <\/span><span style=\"color: #E06C75\">key<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">publicKey<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">dsaEncoding<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'ieee-p1363'<\/span><span style=\"color: #ABB2BF\"> }, <\/span><span style=\"color: #E06C75\">jws<\/span><span style=\"color: #ABB2BF\">));<\/span><\/code><\/pre>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\">DER length: 71\nverify as JWS: false\nJWS length: 64\nverify as JWS: true\n<\/code><\/pre>\n<p>\u0414\u043b\u0438\u043d\u0430 DER-\u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043f\u043b\u0430\u0432\u0430\u0435\u0442 (\u043e\u0431\u044b\u0447\u043d\u043e 70-72 \u0431\u0430\u0439\u0442\u0430), \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c JWS \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442, \u0438 push-\u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (401 \u0438\u043b\u0438 403), \u0445\u043e\u0442\u044f \u043a\u043b\u044e\u0447\u0438 \u0432\u0435\u0440\u043d\u044b\u0435.<\/p>\n<h3>\u0428\u0430\u0433 2. \u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/h3>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u043b\u0438\u043a\u0443, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f service worker, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0435\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">VAPID_PUBLIC_KEY<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'BBV32VDHtodV...'<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #7F848E\">\/\/ \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, base64url<\/span>\n\n<span style=\"color: #C678DD\">function<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">base64UrlToUint8Array<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">) {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">b64<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">replace<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\/-\/g<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">'+'<\/span><span style=\"color: #ABB2BF\">).<\/span><span style=\"color: #E06C75\">replace<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">\/_\/g<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #98C379\">'\/'<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #56B6C2\">+<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'='<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">repeat<\/span><span style=\"color: #ABB2BF\">((<\/span><span style=\"color: #D19A66\">4<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">-<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">s<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">length<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">%<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">4<\/span><span style=\"color: #ABB2BF\">)) <\/span><span style=\"color: #56B6C2\">%<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #D19A66\">4<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">Uint8Array<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #C678DD\">from<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">atob<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">b64<\/span><span style=\"color: #ABB2BF\">), (<\/span><span style=\"color: #E06C75\">c<\/span><span style=\"color: #ABB2BF\">) =&gt; <\/span><span style=\"color: #E06C75\">c<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">charCodeAt<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #D19A66\">0<\/span><span style=\"color: #ABB2BF\">));<\/span>\n<span style=\"color: #ABB2BF\">}<\/span>\n\n<span style=\"color: #E5C07B\">document<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">querySelector<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'#subscribe'<\/span><span style=\"color: #ABB2BF\">).<\/span><span style=\"color: #E06C75\">addEventListener<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'click'<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #C678DD\">async<\/span><span style=\"color: #ABB2BF\"> () =&gt; {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">if<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #56B6C2\">!<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'serviceWorker'<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">in<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">navigator<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #56B6C2\">||<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">!<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'PushManager'<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">in<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">window<\/span><span style=\"color: #ABB2BF\">)) <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">permission<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">await<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">Notification<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">requestPermission<\/span><span style=\"color: #ABB2BF\">(); <\/span><span style=\"color: #7F848E\">\/\/ \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043a\u043b\u0438\u043a\u0443<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">if<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">permission<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">!==<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'granted'<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #7F848E\">\/\/ 'denied' \u0438\u043b\u0438 'default'<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">await<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">navigator<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">serviceWorker<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">register<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'\/sw.js'<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">reg<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">await<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">navigator<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">serviceWorker<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">ready<\/span><span style=\"color: #ABB2BF\">;<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">sub<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #C678DD\">await<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">reg<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">pushManager<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">subscribe<\/span><span style=\"color: #ABB2BF\">({<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">userVisibleOnly<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">true<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">applicationServerKey<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">base64UrlToUint8Array<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">VAPID_PUBLIC_KEY<\/span><span style=\"color: #ABB2BF\">),<\/span>\n<span style=\"color: #ABB2BF\">  });<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">await<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">fetch<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'\/api\/push\/subscriptions'<\/span><span style=\"color: #ABB2BF\">, {<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">method<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'POST'<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">headers<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> { <\/span><span style=\"color: #98C379\">'Content-Type'<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'application\/json'<\/span><span style=\"color: #ABB2BF\"> },<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">body<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E5C07B\">JSON<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">stringify<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">sub<\/span><span style=\"color: #ABB2BF\">), <\/span><span style=\"color: #7F848E\">\/\/ endpoint + keys.p256dh + keys.auth<\/span>\n<span style=\"color: #ABB2BF\">  });<\/span>\n<span style=\"color: #ABB2BF\">});<\/span><\/code><\/pre>\n<p><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">userVisibleOnly: true<\/code> &#8212; \u043e\u0431\u0435\u0449\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 push-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u0432\u0438\u0434\u0438\u043c\u044b\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435\u043c. Chrome \u0438 Safari \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0444\u043e\u043d\u043e\u0432\u044b\u0435 push \u0432 \u0432\u0435\u0431\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u043e\u0438\u0442. Web Push \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 HTTPS (\u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 &#8212; \u043d\u0430 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">localhost<\/code>).<\/p>\n<h3>\u0428\u0430\u0433 3. Service worker \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0424\u0430\u0439\u043b <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">sw.js<\/code> \u043f\u0440\u043e\u0441\u044b\u043f\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0435 push-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u0430\u0434\u043a\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u0430:<\/p>\n<pre style=\"background:#282c34;color:#abb2bf;border-radius:8px;padding:16px 20px;margin:20px 0;overflow-x:auto;font-size:14px;line-height:1.55;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\"><code style=\"background:none\"><span style=\"color: #E06C75\">self<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">addEventListener<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'push'<\/span><span style=\"color: #ABB2BF\">, (<\/span><span style=\"color: #E06C75\">event<\/span><span style=\"color: #ABB2BF\">) =&gt; {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">event<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">?<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">event<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">json<\/span><span style=\"color: #ABB2BF\">() <\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> {};<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E06C75\">event<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">waitUntil<\/span><span style=\"color: #ABB2BF\">(<\/span>\n<span style=\"color: #ABB2BF\">    <\/span><span style=\"color: #E06C75\">self<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">registration<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">showNotification<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">title<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">||<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'\u041d\u043e\u0432\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435'<\/span><span style=\"color: #ABB2BF\">, {<\/span>\n<span style=\"color: #ABB2BF\">      <\/span><span style=\"color: #E06C75\">body<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">body<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">||<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">''<\/span><span style=\"color: #ABB2BF\">,<\/span>\n<span style=\"color: #ABB2BF\">      <\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> { <\/span><span style=\"color: #E06C75\">url<\/span><span style=\"color: #56B6C2\">:<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">url<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">||<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #98C379\">'\/'<\/span><span style=\"color: #ABB2BF\"> },<\/span>\n<span style=\"color: #ABB2BF\">    })<\/span>\n<span style=\"color: #ABB2BF\">  );<\/span>\n<span style=\"color: #ABB2BF\">});<\/span>\n\n<span style=\"color: #E06C75\">self<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">addEventListener<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #98C379\">'notificationclick'<\/span><span style=\"color: #ABB2BF\">, (<\/span><span style=\"color: #E06C75\">event<\/span><span style=\"color: #ABB2BF\">) =&gt; {<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E06C75\">event<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">notification<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">close<\/span><span style=\"color: #ABB2BF\">();<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">const<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">target<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">=<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">new<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">URL<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">event<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">notification<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">data<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">url<\/span><span style=\"color: #ABB2BF\">, <\/span><span style=\"color: #E06C75\">self<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">location<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">origin<\/span><span style=\"color: #ABB2BF\">);<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #C678DD\">if<\/span><span style=\"color: #ABB2BF\"> (<\/span><span style=\"color: #E06C75\">target<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">origin<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #56B6C2\">!==<\/span><span style=\"color: #ABB2BF\"> <\/span><span style=\"color: #E06C75\">self<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">location<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">origin<\/span><span style=\"color: #ABB2BF\">) <\/span><span style=\"color: #C678DD\">return<\/span><span style=\"color: #ABB2BF\">; <\/span><span style=\"color: #7F848E\">\/\/ \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0439 \u0441\u0430\u0439\u0442<\/span>\n<span style=\"color: #ABB2BF\">  <\/span><span style=\"color: #E06C75\">event<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">waitUntil<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">clients<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">openWindow<\/span><span style=\"color: #ABB2BF\">(<\/span><span style=\"color: #E06C75\">target<\/span><span style=\"color: #ABB2BF\">.<\/span><span style=\"color: #E06C75\">href<\/span><span style=\"color: #ABB2BF\">));<\/span>\n<span style=\"color: #ABB2BF\">});<\/span><\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 origin \u043d\u0435 \u0434\u0430\u0435\u0442 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0432 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0447\u0443\u0436\u043e\u0439 \u0441\u0430\u0439\u0442.<\/p>\n<h3>\u0428\u0430\u0433 4. \u041e\u0442\u0432\u0435\u0442\u044b push-\u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/h3>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">POST<\/code> \u043d\u0430 endpoint \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Authorization: vapid t=..., k=...<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Content-Encoding: aes128gcm<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">TTL<\/code> (\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435) \u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">Urgency<\/code>. \u041e\u0442\u0432\u0435\u0442\u044b \u043f\u043e RFC 8030:<\/p>\n<table>\n<thead>\n<tr>\n<th>\u041e\u0442\u0432\u0435\u0442<\/th>\n<th>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/th>\n<th>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>201 Created<\/td>\n<td>\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c<\/td>\n<td>\u043d\u0438\u0447\u0435\u0433\u043e, \u044d\u0442\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430<\/td>\n<\/tr>\n<tr>\n<td>404 \u0438\u043b\u0438 410<\/td>\n<td>\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442<\/td>\n<td>\u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u0438\u0437 \u0431\u0430\u0437\u044b<\/td>\n<\/tr>\n<tr>\n<td>413<\/td>\n<td>\u0442\u0435\u043b\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435<\/td>\n<td>\u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435<\/td>\n<\/tr>\n<tr>\n<td>429<\/td>\n<td>\u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/td>\n<td>\u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u0441 \u043f\u0430\u0443\u0437\u043e\u0439<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"s6\">\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430<\/h2>\n<p>\u041e\u0442\u0432\u0435\u0442 201 \u043e\u0442 push-\u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438\u043b\u0438 200 \u043e\u0442 FCM \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u00ab\u043f\u0440\u0438\u043d\u044f\u0442\u043e\u00bb, \u0430 \u043d\u0435 \u00ab\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043e\u00bb. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f: \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043e\u043b\u0433\u043e \u043e\u0444\u043b\u0430\u0439\u043d \u0438 \u0438\u0441\u0442\u0435\u043a TTL, \u0440\u0435\u0436\u0438\u043c Doze \u0432 Android \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043b \u043a\u0430\u043d\u0430\u043b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0441\u0442\u0430\u0442\u0443\u0441 \u043e\u043f\u043b\u0430\u0442\u044b, \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435) \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438, \u0430 push \u0441\u043b\u0443\u0436\u0438\u0442 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c.<\/p>\n<h2 id=\"s7\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0441\u0442\u044c<\/h2>\n<ul>\n<li>\u0417\u0430\u043a\u0440\u044b\u0442\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 (VAPID, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">.p8<\/code> \u0434\u043b\u044f APNs, JSON \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 FCM) &#8212; \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432, \u043d\u0435 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438 \u043d\u0435 \u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u043c \u043a\u043e\u0434\u0435.<\/li>\n<li>\u0422\u043e\u043a\u0435\u043d \u0438 endpoint &#8212; \u0430\u0434\u0440\u0435\u0441 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438: \u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438\u0445 \u043a\u0430\u043a \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0439\u0442\u0435 \u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438 \u0443\u0434\u0430\u043b\u044f\u0439\u0442\u0435 \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430.<\/li>\n<li>\u0422\u0435\u043a\u0441\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043d \u043d\u0430 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435. \u041a\u043e\u0434\u044b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0443\u0434\u0430 \u043d\u0435 \u043a\u043b\u0430\u0434\u0443\u0442: \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435 \u00ab\u0435\u0441\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u00bb, \u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 &#8212; \u043f\u043e\u0441\u043b\u0435 \u0432\u0445\u043e\u0434\u0430.<\/li>\n<li>\u0412 APNs \u0438 FCM \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 Apple \u0438 Google. \u0422\u0435\u043b\u043e Web Push \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043e \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, push-\u0441\u0435\u0440\u0432\u0438\u0441 \u0435\u0433\u043e \u043d\u0435 \u0447\u0438\u0442\u0430\u0435\u0442, \u043d\u043e \u0432\u0438\u0434\u0438\u0442 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 (\u0432\u0440\u0435\u043c\u044f, \u0440\u0430\u0437\u043c\u0435\u0440, \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f).<\/li>\n<\/ul>\n<h2 id=\"s8\">\u0415\u0441\u043b\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u0421\u0438\u043c\u043f\u0442\u043e\u043c<\/th>\n<th>\u0427\u0430\u0441\u0442\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430<\/th>\n<th>\u0427\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u041d\u0430 Android 13+ \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u0438\u0434\u043d\u043e<\/td>\n<td>\u043d\u0435\u0442 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">POST_NOTIFICATIONS<\/code> \u0438\u043b\u0438 \u043a\u0430\u043d\u0430\u043b \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d<\/td>\n<td>\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/td>\n<\/tr>\n<tr>\n<td>\u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f<\/td>\n<td>\u0432\u044b\u0437\u043e\u0432 \u043d\u0435 \u0438\u0437 \u043a\u043b\u0438\u043a\u0430 \u0438\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u00ab\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb<\/td>\n<td>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0430\u0439\u0442\u0430<\/td>\n<\/tr>\n<tr>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">subscribe<\/code> \u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439<\/td>\n<td>\u043d\u0435\u0442 HTTPS, service worker \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u0435\u043d, \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043b\u044e\u0447<\/td>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">serviceWorker.ready<\/code>, \u0434\u043b\u0438\u043d\u0430 \u043a\u043b\u044e\u0447\u0430 65 \u0431\u0430\u0439\u0442<\/td>\n<\/tr>\n<tr>\n<td>\u0421\u0435\u0440\u0432\u0438\u0441 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 401\/403<\/td>\n<td>\u043e\u0448\u0438\u0431\u043a\u0430 VAPID<\/td>\n<td><code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">aud<\/code>, <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">exp<\/code>, \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 64 \u0431\u0430\u0439\u0442\u0430<\/td>\n<\/tr>\n<tr>\n<td>\u041d\u0430 iPhone Web Push \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/td>\n<td>\u0441\u0430\u0439\u0442 \u043e\u0442\u043a\u0440\u044b\u0442 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 Safari<\/td>\n<td>iOS 16.4+, \u0441\u0430\u0439\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u00ab\u0414\u043e\u043c\u043e\u0439\u00bb, \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0441 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">display: standalone<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"s9\">\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<ul>\n<li>\u041f\u0443\u0442\u044c push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u00ab\u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f -&gt; push-\u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b -&gt; \u041e\u0421 \u0438\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u00bb, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u0447\u0438\u0442\u0441\u044f.<\/li>\n<li>APNs, FCM \u0438 Web Push \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e (\u0430\u0434\u0440\u0435\u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 + \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f + \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043e 4 \u041a\u0411), \u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c; \u0443 FCM \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e HTTP v1 API.<\/li>\n<li>\u0414\u043b\u044f \u043f\u043e\u043a\u0430\u0437\u0430 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0432 Android 13+ \u044d\u0442\u043e runtime-\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 <code style=\"background:#eef0f3;color:#24292f;border-radius:4px;padding:1px 5px;font-size:0.92em;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace\">POST_NOTIFICATIONS<\/code>, \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 &#8212; \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e \u043a\u043b\u0438\u043a\u0443, \u043d\u0430 iPhone Web Push \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u00ab\u0414\u043e\u043c\u043e\u0439\u00bb.<\/li>\n<li>\u00ab\u041f\u0440\u0438\u043d\u044f\u0442\u043e\u00bb \u043d\u0435 \u0440\u0430\u0432\u043d\u043e \u00ab\u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e\u00bb: \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u0430\u043c\u043e, \u043e\u0442\u043e\u0437\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 (404\/410) \u0441\u0435\u0440\u0432\u0435\u0440 \u0443\u0434\u0430\u043b\u044f\u0435\u0442. \u041a\u043b\u044e\u0447\u0438 &#8212; \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/li>\n<\/ul>\n<h2 id=\"s10\">\u0413\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \/ \u0441\u0432\u044f\u0437\u044c \u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439<\/h2>\n<div class=\"oj-cta\" style=\"background:#fbf4e4;border-left:4px solid #c9962b;border-radius:8px;padding:16px 20px;margin:24px 0\">\n<p style=\"margin:0 0 8px\"><strong>\u041e\u0441\u0432\u043e\u0439\u0442\u0435 \u0442\u0435\u043c\u0443 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/strong><\/p>\n<p>\u0421\u0442\u0430\u0442\u0443\u0441\u044b \u0437\u0430\u043a\u0430\u0437\u043e\u0432, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0447\u0430\u0442\u0430\u0445, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043e \u0437\u0430\u043d\u044f\u0442\u0438\u044f\u0445 &#8212; \u0434\u043b\u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 push \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c FCM, \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u043b\u044b \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0436\u0430\u0442\u0438\u0435. \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 Kotlin, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043a\u0443\u0440\u0441 <a href=\"https:\/\/otus.ru\/lessons\/android-basic\/?int_article=push-tehnologii&amp;int_place=article&amp;int_variant=v1\">Android Developer. Basic<\/a>. \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u043c\u044b \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0438 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441 \u043f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 <a href=\"https:\/\/otus.ru\/events\/?int_article=push-tehnologii&amp;int_place=article&amp;int_variant=v1\">\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0443\u0440\u043e\u043a\u0430\u0445 Otus<\/a>.<\/p>\n<\/div>\n<h2 id=\"s11\">FAQ<\/h2>\n<p><strong>\u0427\u0435\u043c push \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 SMS?<\/strong><br \/>\nSMS \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e \u043d\u043e\u043c\u0435\u0440\u0443 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. Push \u0438\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 push-\u0441\u0435\u0440\u0432\u0438\u0441 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0443 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c push \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441\u0430\u0439\u0442\u0430 \u0431\u0435\u0437 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438?<\/strong><br \/>\n\u041d\u0435\u0442. \u0411\u0435\u0437 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435\u0442 \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438.<\/p>\n<p><strong>\u041d\u0443\u0436\u0435\u043d \u043b\u0438 \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439?<\/strong><br \/>\n\u041d\u0443\u0436\u0435\u043d \u0442\u043e\u0442, \u043a\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442 \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 push-\u0441\u0435\u0440\u0432\u0438\u0441: \u0441\u0432\u043e\u0439 \u0431\u044d\u043a\u0435\u043d\u0434 \u0438\u043b\u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a. \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435\u043c, \u0431\u0435\u0437 push.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 &#8212; \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0447\u0435\u0440\u0435\u0437 push-\u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b (Apple, Google \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430), \u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0432\u043a\u043b\u0430\u0434\u043a\u0430 \u0441\u0430\u0439\u0442\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u044b (\u0434\u043b\u044f Web Push \u0441\u0430\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u0432 \u0444\u043e\u043d\u0435). \u041d\u0438\u0436\u0435 &#8212; \u0441\u0445\u0435\u043c\u0430 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438, \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 APNs, FCM \u0438 Web Push, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0432\u043a\u043b\u044e\u0447\u0430\u044f [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":7937,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[65],"class_list":["post-7936","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-polza","tag-programmirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u0441\u0435\u0440\u0432\u0435\u0440, APNs, FCM \u0438 Web Push, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0438 \u0442\u043e\u043a\u0435\u043d, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, POST_NOTIFICATIONS \u0432 Android 13+ \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 VAPID \u043d\u0430 Node.js.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"A. Pavlenko\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/otus.ru\/journal\/push-tehnologii\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#article\",\"name\":\"Push-\\u0443\\u0432\\u0435\\u0434\\u043e\\u043c\\u043b\\u0435\\u043d\\u0438\\u044f: \\u043a\\u0430\\u043a \\u0440\\u0430\\u0431\\u043e\\u0442\\u0430\\u044e\\u0442 APNs, FCM \\u0438 Web Push | Otus\",\"headline\":\"Push-\\u0443\\u0432\\u0435\\u0434\\u043e\\u043c\\u043b\\u0435\\u043d\\u0438\\u044f: \\u043a\\u0430\\u043a \\u0440\\u0430\\u0431\\u043e\\u0442\\u0430\\u044e\\u0442 APNs, FCM \\u0438 Web Push\",\"author\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/oj-1080x72017-1.jpg\",\"width\":2245,\"height\":1587},\"datePublished\":\"2026-09-23T09:00:00+00:00\",\"dateModified\":\"2026-09-25T15:33:57+00:00\",\"inLanguage\":\"ru-RU\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#webpage\"},\"articleSection\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435, \\u043f\\u0440\\u043e\\u0433\\u0440\\u0430\\u043c\\u043c\\u0438\\u0440\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/otus.ru\\\/journal\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/#listItem\",\"name\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/#listItem\",\"position\":2,\"name\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435\",\"item\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#listItem\",\"name\":\"Push-\\u0443\\u0432\\u0435\\u0434\\u043e\\u043c\\u043b\\u0435\\u043d\\u0438\\u044f: \\u043a\\u0430\\u043a \\u0440\\u0430\\u0431\\u043e\\u0442\\u0430\\u044e\\u0442 APNs, FCM \\u0438 Web Push\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#listItem\",\"position\":3,\"name\":\"Push-\\u0443\\u0432\\u0435\\u0434\\u043e\\u043c\\u043b\\u0435\\u043d\\u0438\\u044f: \\u043a\\u0430\\u043a \\u0440\\u0430\\u0431\\u043e\\u0442\\u0430\\u044e\\u0442 APNs, FCM \\u0438 Web Push\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/category\\\/polza\\\/#listItem\",\"name\":\"\\u041f\\u043e\\u043b\\u0435\\u0437\\u043d\\u043e\\u0435\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#organization\",\"name\":\"\\u041e\\u0442\\u0443\\u0441 \\u043e\\u043d\\u043b\\u0430\\u0439\\u043d-\\u043e\\u0431\\u0440\\u0430\\u0437\\u043e\\u0432\\u0430\\u043d\\u0438\\u0435\",\"description\":\"\\u0411\\u043b\\u043e\\u0433 \\u043f\\u0440\\u043e IT\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/\",\"telephone\":\"+74999389202\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/OTUS-journal-logo-180x180-1.png\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#organizationLogo\",\"width\":180,\"height\":180},\"image\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCetgtvy93o3i3CvyGXKFU3g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/\",\"name\":\"A. Pavlenko\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13488c7d5b657aaaf1808afd398f71e0225df07dd94eb7e5fcdfc45feff43cb5?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"A. Pavlenko\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#webpage\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/\",\"name\":\"Push-\\u0443\\u0432\\u0435\\u0434\\u043e\\u043c\\u043b\\u0435\\u043d\\u0438\\u044f: \\u043a\\u0430\\u043a \\u0440\\u0430\\u0431\\u043e\\u0442\\u0430\\u044e\\u0442 APNs, FCM \\u0438 Web Push | Otus\",\"description\":\"\\u041a\\u0430\\u043a \\u0443\\u0441\\u0442\\u0440\\u043e\\u0435\\u043d\\u044b push-\\u0443\\u0432\\u0435\\u0434\\u043e\\u043c\\u043b\\u0435\\u043d\\u0438\\u044f: \\u0441\\u0435\\u0440\\u0432\\u0435\\u0440, APNs, FCM \\u0438 Web Push, \\u043f\\u043e\\u0434\\u043f\\u0438\\u0441\\u043a\\u0430 \\u0438 \\u0442\\u043e\\u043a\\u0435\\u043d, \\u0440\\u0430\\u0437\\u0440\\u0435\\u0448\\u0435\\u043d\\u0438\\u0435 \\u043f\\u043e\\u043b\\u044c\\u0437\\u043e\\u0432\\u0430\\u0442\\u0435\\u043b\\u044f, POST_NOTIFICATIONS \\u0432 Android 13+ \\u0438 \\u043f\\u0440\\u0438\\u043c\\u0435\\u0440 VAPID \\u043d\\u0430 Node.js.\",\"inLanguage\":\"ru-RU\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/author\\\/a-pavlenko\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/oj-1080x72017-1.jpg\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#mainImage\",\"width\":2245,\"height\":1587},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/push-tehnologii\\\/#mainImage\"},\"datePublished\":\"2026-09-23T09:00:00+00:00\",\"dateModified\":\"2026-09-25T15:33:57+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#website\",\"url\":\"https:\\\/\\\/otus.ru\\\/journal\\\/\",\"name\":\"OTUS \\u0416\\u0443\\u0440\\u043d\\u0430\\u043b - \\u0411\\u043b\\u043e\\u0433 \\u043f\\u0440\\u043e IT\",\"alternateName\":\"OTUS \\u0416\\u0443\\u0440\\u043d\\u0430\\u043b\",\"description\":\"\\u0411\\u043b\\u043e\\u0433 \\u043f\\u0440\\u043e IT\",\"inLanguage\":\"ru-RU\",\"publisher\":{\"@id\":\"https:\\\/\\\/otus.ru\\\/journal\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 APNs, FCM \u0438 Web Push | Otus","description":"\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u0441\u0435\u0440\u0432\u0435\u0440, APNs, FCM \u0438 Web Push, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0438 \u0442\u043e\u043a\u0435\u043d, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, POST_NOTIFICATIONS \u0432 Android 13+ \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 VAPID \u043d\u0430 Node.js.","canonical_url":"https:\/\/otus.ru\/journal\/push-tehnologii\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#article","name":"Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 APNs, FCM \u0438 Web Push | Otus","headline":"Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 APNs, FCM \u0438 Web Push","author":{"@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author"},"publisher":{"@id":"https:\/\/otus.ru\/journal\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/otus.ru\/journal\/wp-content\/uploads\/2023\/11\/oj-1080x72017-1.jpg","width":2245,"height":1587},"datePublished":"2026-09-23T09:00:00+00:00","dateModified":"2026-09-25T15:33:57+00:00","inLanguage":"ru-RU","mainEntityOfPage":{"@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#webpage"},"isPartOf":{"@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#webpage"},"articleSection":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435"},{"@type":"BreadcrumbList","@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/#listItem","position":1,"name":"Home","item":"https:\/\/otus.ru\/journal\/","nextItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/category\/polza\/#listItem","name":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435"}},{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/category\/polza\/#listItem","position":2,"name":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435","item":"https:\/\/otus.ru\/journal\/category\/polza\/","nextItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#listItem","name":"Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 APNs, FCM \u0438 Web Push"},"previousItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#listItem","position":3,"name":"Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 APNs, FCM \u0438 Web Push","previousItem":{"@type":"ListItem","@id":"https:\/\/otus.ru\/journal\/category\/polza\/#listItem","name":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435"}}]},{"@type":"Organization","@id":"https:\/\/otus.ru\/journal\/#organization","name":"\u041e\u0442\u0443\u0441 \u043e\u043d\u043b\u0430\u0439\u043d-\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435","description":"\u0411\u043b\u043e\u0433 \u043f\u0440\u043e IT","url":"https:\/\/otus.ru\/journal\/","telephone":"+74999389202","logo":{"@type":"ImageObject","url":"https:\/\/otus.ru\/journal\/wp-content\/uploads\/2026\/04\/OTUS-journal-logo-180x180-1.png","@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#organizationLogo","width":180,"height":180},"image":{"@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#organizationLogo"},"sameAs":["https:\/\/www.youtube.com\/channel\/UCetgtvy93o3i3CvyGXKFU3g"]},{"@type":"Person","@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author","url":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/","name":"A. Pavlenko","image":{"@type":"ImageObject","@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/13488c7d5b657aaaf1808afd398f71e0225df07dd94eb7e5fcdfc45feff43cb5?s=96&d=mm&r=g","width":96,"height":96,"caption":"A. Pavlenko"}},{"@type":"WebPage","@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#webpage","url":"https:\/\/otus.ru\/journal\/push-tehnologii\/","name":"Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 APNs, FCM \u0438 Web Push | Otus","description":"\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u0441\u0435\u0440\u0432\u0435\u0440, APNs, FCM \u0438 Web Push, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0438 \u0442\u043e\u043a\u0435\u043d, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, POST_NOTIFICATIONS \u0432 Android 13+ \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 VAPID \u043d\u0430 Node.js.","inLanguage":"ru-RU","isPartOf":{"@id":"https:\/\/otus.ru\/journal\/#website"},"breadcrumb":{"@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#breadcrumblist"},"author":{"@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author"},"creator":{"@id":"https:\/\/otus.ru\/journal\/author\/a-pavlenko\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/otus.ru\/journal\/wp-content\/uploads\/2023\/11\/oj-1080x72017-1.jpg","@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#mainImage","width":2245,"height":1587},"primaryImageOfPage":{"@id":"https:\/\/otus.ru\/journal\/push-tehnologii\/#mainImage"},"datePublished":"2026-09-23T09:00:00+00:00","dateModified":"2026-09-25T15:33:57+00:00"},{"@type":"WebSite","@id":"https:\/\/otus.ru\/journal\/#website","url":"https:\/\/otus.ru\/journal\/","name":"OTUS \u0416\u0443\u0440\u043d\u0430\u043b - \u0411\u043b\u043e\u0433 \u043f\u0440\u043e IT","alternateName":"OTUS \u0416\u0443\u0440\u043d\u0430\u043b","description":"\u0411\u043b\u043e\u0433 \u043f\u0440\u043e IT","inLanguage":"ru-RU","publisher":{"@id":"https:\/\/otus.ru\/journal\/#organization"}}]}},"aioseo_meta_data":{"post_id":"7936","title":"Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 APNs, FCM \u0438 Web Push | Otus","description":"\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u0441\u0435\u0440\u0432\u0435\u0440, APNs, FCM \u0438 Web Push, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0438 \u0442\u043e\u043a\u0435\u043d, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, POST_NOTIFICATIONS \u0432 Android 13+ \u0438 \u043f\u0440\u0438\u043c\u0435\u0440 VAPID \u043d\u0430 Node.js.","keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-11-09 21:15:53","updated":"2026-09-25 17:28:31","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/otus.ru\/journal\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/otus.ru\/journal\/category\/polza\/\" title=\"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435\">\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPush-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 APNs, FCM \u0438 Web Push\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/otus.ru\/journal\/"},{"label":"\u041f\u043e\u043b\u0435\u0437\u043d\u043e\u0435","link":"https:\/\/otus.ru\/journal\/category\/polza\/"},{"label":"Push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 APNs, FCM \u0438 Web Push","link":"https:\/\/otus.ru\/journal\/push-tehnologii\/"}],"_links":{"self":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/7936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/comments?post=7936"}],"version-history":[{"count":4,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/7936\/revisions"}],"predecessor-version":[{"id":13041,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/posts\/7936\/revisions\/13041"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/media\/7937"}],"wp:attachment":[{"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/media?parent=7936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/categories?post=7936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/otus.ru\/journal\/wp-json\/wp\/v2\/tags?post=7936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}