{"id":2827,"date":"2023-04-19T18:06:10","date_gmt":"2023-04-19T14:36:10","guid":{"rendered":"https:\/\/vandar.io\/blog\/?p=2827"},"modified":"2023-04-19T18:06:10","modified_gmt":"2023-04-19T14:36:10","slug":"pwa-%da%86%db%8c%d8%b3%d8%aa","status":"publish","type":"post","link":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/","title":{"rendered":"\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA"},"content":{"rendered":"<p><b>PWA \u0686\u06cc\u0633\u062a\u061f<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u062f\u0631 \u0633\u0627\u0644 \u06f2\u06f0\u06f1\u06f5 \u0639\u0628\u0627\u0631\u062a <\/span><span style=\"font-weight: 400;\">Progressive Web App \u06cc\u0627 \u0647\u0645\u0627\u0646 PWA<\/span> <span style=\"font-weight: 400;\">\u062a\u0648\u0633\u0637 \u06af\u0648\u06af\u0644 \u0645\u0639\u0631\u0641\u06cc \u0634\u062f. PWA\u0647\u0627 \u0648\u0628 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646\u200c\u0647\u0627\u06cc\u06cc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc\u200c\u0647\u0627\u06cc (JavaScript\u060c HTML\u060c CSS\u060c WebAssembly) \u0633\u0627\u062e\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0648 \u062a\u062c\u0631\u0628\u0647\u200c\u0627\u06cc \u0645\u0634\u0627\u0628\u0647 \u0628\u0627 Native App \u0631\u0627 \u062f\u0631 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. PWA\u0647\u0627 <\/span><b>\u0628\u0627 \u0648\u062c\u0648\u062f \u062f\u0627\u0634\u062a\u0646 \u06cc\u06a9 Codebase<\/b><span style=\"font-weight: 400;\">\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0646\u0635\u0628 \u0634\u0648\u0646\u062f \u0648 \u0631\u0648\u06cc \u062a\u0645\u0627\u0645 \u062f\u0633\u062a\u06af\u0627\u0647\u200c\u0647\u0627 (Windows, macOS, Android, iOS) \u0627\u062c\u0631\u0627 \u0634\u0648\u0646\u062f \u0648 \u0647\u0645\u0686\u0646\u06cc\u0646 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u0646\u062f \u0622\u0646 \u0631\u0627 \u0628\u0647 home screen \u062f\u0633\u062a\u06af\u0627\u0647 \u062e\u0648\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u0646\u062f.<\/span><\/p>\n<p><b>\u0645\u0632\u0627\u06cc\u0627\u06cc \u200cPWA:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0627 \u0627\u0641\u0632\u0627\u06cc\u0634 \u062d\u0645\u0627\u06cc\u062a\u200c \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644\u200c\u0647\u0627(OS) \u0648 \u0645\u0631\u0648\u0631\u06af\u0631\u0647\u0627(browser) \u0627\u0632 \u0627\u06cc\u0646 \u0648\u0628 \u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc\u060c PWA\u200c\u0647\u0627 \u0628\u0647\u062a\u0631\u06cc\u0646 \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627\u06cc \u0648\u0628\u0633\u0627\u06cc\u062a\u200c\u0647\u0627 \u0648 Native App\u200c\u0647\u0627 \u0631\u0627 \u062f\u0627\u0631\u0646\u062f:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0645\u06cc\u0632\u0627\u0646 \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0627\u0644\u0627 \u0648 \u0631\u0627\u062d\u062a: \u0622\u0646\u200c\u0647\u0627 \u0645\u06cc\u062a\u0648\u0627\u0646\u0646\u062f \u062a\u0648\u0633\u0637 \u0645\u0648\u062a\u0648\u0631\u0647\u0627\u06cc \u062c\u0633\u062a\u062c\u0648 \u067e\u06cc\u062f\u0627 \u0634\u0648\u0646\u062f\u060c \u0628\u0627 \u200c\u200cURL \u0628\u0627\u0632 \u0634\u0648\u0646\u062f\u060c \u0628\u0647 \u0627\u0634\u062a\u0631\u0627\u06a9 \u06af\u0630\u0627\u0634\u062a\u0647 \u0634\u0648\u0646\u062f \u0648 \u0628\u0627 \u0647\u0631 \u062f\u0633\u062a\u06af\u0627\u0647\u06cc \u06a9\u0647 \u0645\u0631\u0648\u0631\u06af\u0631 \u062f\u0627\u0631\u062f \u0627\u062c\u0631\u0627 \u0634\u0648\u0646\u062f.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u062a\u062c\u0631\u0628\u0647 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0645\u0634\u0627\u0628\u0647 \u0628\u0627 Native App: \u0622\u0646\u200c\u0647\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u0622\u0641\u0644\u0627\u06cc\u0646 \u06a9\u0627\u0631 \u06a9\u0646\u0646\u062f\u060c \u0646\u0635\u0628 \u0634\u0648\u0646\u062f \u0648 \u062f\u0631\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">home screen \u062f\u0633\u062a\u06af\u0627\u0647 \u0627\u0636\u0627\u0641\u0647 \u0634\u0648\u062f\u060c Push Notification \u062f\u0627\u0631\u0646\u062f \u0648 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u062f\u0631 \u200cStore \u0645\u0646\u062a\u0634\u0631 \u06a9\u0631\u062f.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0647\u0632\u06cc\u0646\u0647 \u067e\u0627\u06cc\u06cc\u0646 \u062a\u0648\u0633\u0639\u0647 \u0648 \u0646\u06af\u0647\u062f\u0627\u0631\u06cc \u0646\u0633\u0628\u062a \u0628\u0647 \u200cNative App\u0647\u0627: PWA\u200c\u0647\u0627 \u0628\u0627 \u06cc\u06a9 Codebase\u060c \u0628\u0631\u0627\u06cc \u062a\u0645\u0627\u0645 \u067e\u0644\u062a\u0641\u0631\u0645\u200c\u0647\u0627 \u062a\u0648\u0633\u0639\u0647 \u062f\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0648 \u0646\u06cc\u0627\u0632\u0645\u0646\u062f \u0686\u0646\u062f \u062a\u06cc\u0645 \u062a\u0648\u0633\u0639\u0647 \u0645\u062e\u062a\u0644\u0641 \u0628\u0631\u0627\u06cc \u0647\u0631 \u067e\u0644\u062a\u0641\u0631\u0645 \u0646\u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u06a9\u0647 \u0627\u06cc\u0646 \u0645\u0648\u0636\u0648\u0639 \u0628\u0627\u0639\u062b \u06a9\u0627\u0647\u0634 \u0647\u0632\u06cc\u0646\u0647\u200c\u0647\u0627\u06cc \u062a\u0648\u0633\u0639\u0647 \u0648 \u0646\u06af\u0647\u062f\u0627\u0631\u06cc \u0645\u06cc\u200c\u0634\u0648\u062f.<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><b>\u0645\u062d\u062f\u0648\u062f\u06cc\u062a\u200c\u0647\u0627\u06cc PWA:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0627 \u0648\u062c\u0648\u062f \u062d\u0645\u0627\u06cc\u062a\u200c \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644\u200c\u0647\u0627\u060c \u0647\u0645\u0686\u0646\u0627\u0646 \u0645\u062d\u062f\u0648\u062f\u06cc\u062a\u200c\u0647\u0627\u06cc\u06cc \u0628\u0631\u0627\u06cc \u200cPWA \u062f\u0631 \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 iOS \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0\u062f\u0631 \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 iOS \u0627\u0632 push notification \u062d\u0645\u0627\u06cc\u062a \u0646\u0645\u06cc\u200c\u0634\u0648\u062f.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0628\u0631\u062e\u0644\u0627\u0641 \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 \u0627\u0646\u062f\u0631\u0648\u06cc\u062f\u060c \u062f\u0631 \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 iOS \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631 Safari \u0645\u062d\u062f\u0648\u062f\u06cc\u062a 50MB \u0628\u0631\u0627\u06cc PWA \u062a\u0639\u06cc\u06cc\u0646 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u0627\u06af\u0631 \u0627\u06cc\u0646 \u0641\u0636\u0627\u06cc \u062a\u0639\u06cc\u06cc\u0646 \u0634\u062f\u0647 \u067e\u0631 \u0634\u0648\u062f \u0645\u0631\u0648\u0631\u06af\u0631 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u067e\u0627\u06a9 \u06a9\u0631\u062f\u0646 \u0645\u062d\u062a\u0648\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u0634\u062f\u0647 \u062f\u0631\u00a0 Cache \u0631\u0627 \u062e\u0648\u0627\u0647\u062f \u062f\u0627\u0634\u062a.<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u0627\u0644\u0628\u062a\u0647 \u0644\u0627\u0632\u0645 \u0628\u0647 \u0630\u06a9\u0631 \u0627\u0633\u062a \u0627\u06cc\u0646 \u0645\u062d\u062f\u0648\u062f\u06cc\u062a\u200c\u0647\u0627 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u062f\u0631 \u0648\u0631\u0698\u0646\u200c\u0647\u0627\u06cc \u062c\u062f\u06cc\u062f\u062a\u0631 \u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644 \u200ciOS \u0628\u0631\u0637\u0631\u0641 \u0634\u0648\u062f.<\/span><\/p>\n<p><b>\u06cc\u06a9 \u200cPWA \u062e\u0648\u0628 \u0686\u0647 \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627\u06cc\u06cc \u062f\u0627\u0631\u062f\u061f<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0642\u0627\u0628\u0644\u06cc\u062a \u062f\u0633\u062a\u0631\u0633\u06cc: \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 PWA \u0631\u0627 \u062f\u0631 App Store \u0648 \u06cc\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u062c\u0633\u062a\u062c\u0648 \u062f\u0631 Search Engine\u0647\u0627 \u067e\u06cc\u062f\u0627 \u06a9\u0631\u062f.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0642\u0627\u0628\u0644\u06cc\u062a \u0646\u0635\u0628: \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0622\u0646 \u0631\u0627 \u0646\u0635\u0628 \u06a9\u0631\u062f \u0648 \u0628\u0647 home screen \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f (\u0645\u0627\u0646\u0646\u062f Native App\u0647\u0627)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0642\u0627\u0628\u0644\u06cc\u062a \u062a\u0639\u0627\u0645\u0644 \u0628\u0627 \u06a9\u0627\u0631\u0628\u0631: \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0646\u0648\u062a\u06cc\u0641\u06cc\u06a9\u06cc\u0634\u0646 \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0631\u062f (\u062d\u062a\u06cc \u0627\u06af\u0631 PWA \u062f\u0631 \u062d\u0627\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0628\u0627\u0634\u062f)\u00a0\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u062a\u062c\u0631\u0628\u0647 \u06a9\u0627\u0631\u0628\u0631\u06cc offline: \u062a\u062c\u0631\u0628\u0647 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0645\u0646\u0627\u0633\u0628 \u0628\u0631\u0627\u06cc \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0627\u06cc\u0646\u062a\u0631\u0646\u062a \u0642\u0637\u0639 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f.(\u0645\u0627\u0646\u0646\u062f Native App\u0647\u0627)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0627\u0645\u0646\u06cc\u062a: PWA \u0627\u0632 \u0634\u0628\u06a9\u0647 \u0627\u06cc\u0645\u0646 \u0628\u0631\u0627\u06cc \u062a\u0628\u0627\u062f\u0644 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0637\u0631\u0627\u062d\u06cc Responsive: \u0645\u0637\u0627\u0628\u0642 \u0627\u0646\u062f\u0627\u0632\u0647 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u062f\u0633\u062a\u06af\u0627\u0647 \u0628\u0627\u0634\u062f.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0Linkability: \u0628\u062a\u0648\u0627\u0646 \u0622\u0646 \u0631\u0627 \u0628\u0627 URL \u0628\u0627\u0632 \u06a9\u0631\u062f\u060c \u0628\u0647 \u0627\u0634\u062a\u0631\u0627\u06a9 \u06af\u0630\u0627\u0634\u062a \u0648 \u06cc\u0627 Bookmark \u06a9\u0631\u062f (\u0645\u0627\u0646\u0646\u062f \u0648\u0628\u0633\u0627\u06cc\u062a\u200c\u0647\u0627)<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><b>PWA<\/b><b> \u0627\u0632 \u0686\u0647 \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a\u200c\u0647\u0627\u06cc\u06cc \u062a\u0634\u06a9\u06cc\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f\u061f<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0PWA \u0627\u0632 \u0627\u06cc\u0646 \u0633\u0647 \u0645\u0648\u0644\u0641\u0647 \u0627\u0635\u0644\u06cc \u062a\u0634\u06a9\u06cc\u0644 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0HTTPS: \u0628\u0627\u0639\u062b \u0645\u06cc\u200c\u0634\u0648\u062f PWA \u0627\u06cc\u0645\u0646 \u0628\u0627\u0634\u062f.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0Service Worker: \u0628\u0627\u0639\u062b \u0645\u06cc\u200c\u0634\u0648\u062f \u200cPWA \u0642\u0627\u0628\u0644 \u0627\u0639\u062a\u0645\u0627\u062f \u0648 \u0645\u0633\u062a\u0642\u0644 \u0627\u0632 Network \u0628\u0627\u0634\u062f.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0Manifest: \u0628\u0627\u0639\u062b \u0645\u06cc\u200c\u0634\u0648\u062f \u200cPWA \u0642\u0627\u0628\u0644 \u0646\u0635\u0628 \u0628\u0627\u0634\u062f.<\/span><\/li>\n<\/ul>\n<p><b><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2834 aligncenter\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f2.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f2.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f2-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f2-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f2-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f2-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f2-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/b><\/p>\n<p><b>\u06f1-\u00a0 HTTPS:<\/b><span style=\"font-weight: 400;\"> \u067e\u0631\u0648\u062a\u06a9\u0644 \u200cHTTPS \u06cc\u0627 HyperText Transfer Protocol Secure \u0646\u0633\u062e\u0647 \u0627\u06cc\u0645\u0646 HTTP \u0627\u0633\u062a \u06a9\u0647 \u062a\u0628\u0627\u062f\u0644\u0627\u062a \u0628\u06cc\u0646 Client \u0648 Server \u062f\u0631 Web App \u0631\u0627 \u0631\u0645\u0632\u06af\u0630\u0627\u0631\u06cc \u0645\u06cc\u06a9\u0646\u062f. PWA \u0628\u0627\u06cc\u062f \u062d\u062a\u0645\u0627 \u0631\u0648\u06cc \u067e\u0631\u0648\u062a\u06a9\u0644 HTTPS \u067e\u06cc\u0627\u062f\u0647\u200c\u0633\u0627\u0632\u06cc \u0634\u0648\u062f \u0648 \u0648\u062c\u0648\u062f HTTPS \u0628\u0631\u0627\u06cc Service Worker\u200c\u0647\u0627 \u0627\u0644\u0632\u0627\u0645\u06cc \u0627\u0633\u062a.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>\u06f2-\u00a0 Service Worker:\u00a0<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0Service Worker\u200c\u0647\u0627 \u0646\u0648\u0639\u06cc \u0627\u0632 Web Worker\u200c\u0647\u0627 \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u062f\u0631 Thread \u062c\u062f\u0627\u06af\u0627\u0646\u0647 \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f \u0648 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u200cFetch API \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0647\u0631 Network Request \u0631\u0627 \u0631\u0647\u06af\u06cc\u0631\u06cc\u060c \u062a\u063a\u06cc\u06cc\u0631 \u0648 \u067e\u0627\u0633\u062e \u062f\u0647\u0646\u062f. \u0647\u0645\u0686\u0646\u06cc\u0646 Service Worker\u200c\u0647\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0Cache API \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0628\u0647 Cache \u0633\u0645\u062a Client \u0648 Asynchronous Store \u0633\u0645\u062a Client (\u0645\u0627\u0646\u0646\u062f IndexedDB) \u0628\u0631\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u0627\u0637\u0644\u0627\u0639\u0627\u062a (\u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062f\u0631 \u0645\u0648\u0627\u0642\u0639\u06cc \u06a9\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0622\u0641\u0644\u0627\u06cc\u0646 \u0627\u0633\u062a) \u062f\u0633\u062a\u0631\u0633\u06cc \u062f\u0627\u0631\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0Service Worker\u0647\u0627 \u0628\u0627\u0639\u062b \u0645\u06cc\u200c\u0634\u0648\u062f PWA \u0642\u0627\u0628\u0644 \u0627\u0639\u062a\u0645\u0627\u062f \u0648 Network-Independent \u0628\u0627\u0634\u062f \u0628\u0647 \u0637\u0648\u0631\u06cc \u06a9\u0647 \u062a\u062c\u0631\u0628\u0647 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0645\u0648\u062b\u0631\u06cc \u0628\u0631\u0627\u06cc \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0622\u0641\u0644\u0627\u06cc\u0646 \u0627\u0633\u062a \u06cc\u0627 \u0627\u06cc\u0646\u062a\u0631\u0646\u062a \u0636\u0639\u06cc\u0641 \u062f\u0627\u0631\u062f\u060c \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc\u200c\u0622\u0648\u0631\u062f.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>Service Worker\u0647\u0627 \u0686\u0637\u0648\u0631 \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f\u061f<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0628\u062f\u0627\u0646\u06cc\u0645 Service Worker\u0647\u0627 \u0686\u0637\u0648\u0631 \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f\u060c \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u06cc\u0645 \u062f\u0648 \u0645\u0641\u0647\u0648\u0645 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u062f\u0627\u0646\u06cc\u0645:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u062b\u0628\u062a \u0633\u0631\u0648\u06cc\u0633 \u0648\u0631\u06a9\u0631 (Service Worker Registration)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0686\u0631\u062e\u0647 \u062d\u06cc\u0627\u062a \u0633\u0631\u0648\u06cc\u0633 \u0648\u0631\u06a9\u0631 (Service Worker Lifecycle)<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u062b\u0628\u062a \u0633\u0631\u0648\u06cc\u0633 \u0648\u0631\u06a9\u0631 (Service Worker Registration):<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0631\u0627\u06cc \u062b\u0628\u062a Service Worker \u0627\u0632 \u06a9\u062f \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u0648 \u0627\u06cc\u0646 \u06a9\u062f \u0631\u0627 \u062f\u0631 \u062a\u06af script \u0648 \u062f\u0631 \u0627\u0646\u062a\u0647\u0627\u06cc \u0642\u0633\u0645\u062a body \u062f\u0631 \u0635\u0641\u062d\u0647 html \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u062f\u0647\u06cc\u0645:\u00a0<\/span><\/p>\n<table style=\"height: 159px;\" width=\"492\">\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">if<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;serviceWorker&#8217;<\/span> <span style=\"font-weight: 400;\">in<\/span><span style=\"font-weight: 400;\"> navigator) {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span> <span style=\"font-weight: 400;\">\/\/ Register the service worker \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> navigator.serviceWorker.register(<\/span><span style=\"font-weight: 400;\">&#8216;\/sw.js&#8217;<\/span><span style=\"font-weight: 400;\">, { scope: <\/span><span style=\"font-weight: 400;\">&#8216;\/&#8217;<\/span><span style=\"font-weight: 400;\"> });<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">}<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u0627\u0632 \u0622\u0646\u062c\u0627\u06cc\u06cc \u06a9\u0647 Service Worker\u200c\u0647\u0627 \u0641\u0642\u0637 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u062a\u0645\u0627\u0645 Request\u200c\u0647\u0627\u06cc \u0635\u0641\u062d\u0627\u062a\u06cc \u06a9\u0647 \u062f\u0631 Scope \u0641\u0627\u06cc\u0644 Service Worker \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u0646\u062f \u0631\u0627 \u0631\u0647\u06af\u06cc\u0631\u06cc \u0648 \u0645\u062f\u06cc\u0631\u06cc\u062a \u06a9\u0646\u0646\u062f\u060c \u0628\u0627\u06cc\u062f \u0641\u0627\u06cc\u0644 Service Worker \u0631\u0627 \u062f\u0631 root \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0647\u06cc\u0645.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u0686\u0631\u062e\u0647 \u062d\u06cc\u0627\u062a \u0633\u0631\u0648\u06cc\u0633 \u0648\u0631\u06a9\u0631 (Service Worker Lifecycle):<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0642\u0633\u0645\u062a Lifecycle Event \u0634\u0627\u0645\u0644 \u0627\u06cc\u0646 \u0633\u0647 \u0641\u0627\u0632 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u062b\u0628\u062a (\u200cRegisteration): \u062f\u0631 \u0627\u06cc\u0646 \u0641\u0627\u0632 \u0645\u0631\u0648\u0631\u06af\u0631 Service Worker \u0631\u0627 \u200cRegister\u0645\u06cc\u200c\u06a9\u0646\u062f.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0646\u0635\u0628 (Installation): \u062f\u0631 \u0627\u06cc\u0646 \u0641\u0627\u0632 \u0645\u0631\u0648\u0631\u06af\u0631\u00a0 Service Worker \u0631\u0627 \u0646\u0635\u0628 \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0647\u0645\u0686\u0646\u06cc\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 \u0627\u06cc\u0646 \u0645\u0631\u062d\u0644\u0647 \u0628\u0631\u0627\u06cc pre-caching resources \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f (\u0628\u0631\u0627\u06cc cache \u06a9\u0631\u062f\u0646 \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u06cc \u06a9\u0647 \u062a\u063a\u06cc\u06cc\u0631 \u0686\u0646\u062f\u0627\u0646\u06cc \u0646\u0645\u06cc\u200c\u06a9\u0646\u0646\u062f \u0645\u062b\u0644 logo \u0647\u0627)<\/span><\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">self.addEventListener( <\/span><span style=\"font-weight: 400;\">&#8220;install&#8221;<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">function<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\"> event <\/span><span style=\"font-weight: 400;\">){<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">console<\/span><span style=\"font-weight: 400;\">.log( <\/span><span style=\"font-weight: 400;\">&#8220;WORKER: install event in progress.&#8221;<\/span><span style=\"font-weight: 400;\"> );<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">});<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0641\u0639\u0627\u0644\u0633\u0627\u0632\u06cc (Activation): \u062f\u0631 \u0627\u06cc\u0646 \u0641\u0627\u0632 \u0645\u0631\u0648\u0631\u06af\u0631 \u0628\u0627 \u0627\u0631\u0633\u0627\u0644 activate event \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f \u06a9\u0647 Service Worker \u0646\u0635\u0628 \u0634\u062f\u0647 \u0627\u0633\u062a \u0648 \u0627\u06cc\u0646 Service Worker \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 Service Worker \u0642\u0628\u0644\u06cc \u0634\u0648\u062f \u0648<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u00a0functional event\u200c\u0647\u0627 \u0631\u0627 \u0647\u0646\u062f\u0644 \u06a9\u0646\u062f.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">self.addEventListener( <\/span><span style=\"font-weight: 400;\">&#8220;activate&#8221;<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">function<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\"> event <\/span><span style=\"font-weight: 400;\">){<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">console<\/span><span style=\"font-weight: 400;\">.log( <\/span><span style=\"font-weight: 400;\">&#8220;WORKER: activation event in progress.&#8221;<\/span><span style=\"font-weight: 400;\"> );<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 clients.claim();<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">console<\/span><span style=\"font-weight: 400;\">.log( <\/span><span style=\"font-weight: 400;\">&#8220;WORKER: all clients are now controlled by me!&#8221;<\/span><span style=\"font-weight: 400;\"> );<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">});<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632\u00a0 clients.claim \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0646\u0633\u062e\u0647 \u0642\u0628\u0644\u06cc \u0631\u0627 \u0641\u0648\u0631\u0627 \u0628\u0627 \u0646\u0633\u062e\u0647 \u062c\u062f\u06cc\u062f \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u06a9\u0631\u062f.<\/span><\/p>\n<p><b>\u062a\u0648\u0636\u06cc\u062d \u062f\u0631 \u0645\u0648\u0631\u062f Functional Event\u0647\u0627\u06cc \u0633\u0631\u0648\u06cc\u0633 \u0648\u0631\u06a9\u0631:<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0645\u0648\u0631\u062f \u0627\u0648\u0644 fetch event: \u0627\u06cc\u0646 Event \u0645\u0648\u0642\u0639\u06cc \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u0645\u0631\u0648\u0631\u06af\u0631 \u062a\u0644\u0627\u0634 \u0645\u06cc\u200c\u06a9\u0646\u062f \u062a\u0627 \u0628\u0647 \u0635\u0641\u062d\u0647\u200c\u0627\u06cc \u06a9\u0647 \u062f\u0631 Scope \u0641\u0627\u06cc\u0644 Service Worker \u0642\u0631\u0627\u0631 \u062f\u0627\u0631\u062f\u060c \u062f\u0633\u062a\u0631\u0633\u06cc \u067e\u06cc\u062f\u0627 \u06a9\u0646\u062f. Service Worker \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u200cInterceptor \u0639\u0645\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 Response \u0631\u0627 \u0628\u0631 \u0627\u0633\u0627\u0633 Cache Strategy \u062a\u0639\u06cc\u06cc\u0646 \u0634\u062f\u0647 \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f.<\/span><\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">self.addEventListener( <\/span><span style=\"font-weight: 400;\">&#8220;fetch&#8221;<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">function<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\"> event <\/span><span style=\"font-weight: 400;\">){<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">console<\/span><span style=\"font-weight: 400;\">.log( <\/span><span style=\"font-weight: 400;\">&#8220;WORKER: Fetching&#8221;<\/span><span style=\"font-weight: 400;\">, event.request );<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">});<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0645\u0648\u0631\u062f \u062f\u0648\u0645 push event: \u0627\u06cc\u0646 Event \u0645\u0648\u0642\u0639\u06cc \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u0645\u0631\u0648\u0631\u06af\u0631 \u06cc\u06a9 \u067e\u06cc\u0627\u0645 \u0627\u0632 Server \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc\u200c\u06a9\u0646\u062f \u062a\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 Notification \u0628\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0647\u062f. \u0628\u0627 \u0646\u0645\u0627\u06cc\u0634 \u067e\u06cc\u0627\u0645 \u0628\u0647 \u06a9\u0627\u0631\u0628\u0631 \u062d\u062a\u06cc \u0645\u0648\u0627\u0642\u0639\u06cc \u06a9\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0631 \u062f\u0633\u062a\u06af\u0627\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0628\u0627\u0632 \u0646\u0645\u06cc\u200c\u0628\u0627\u0634\u062f\u060c \u0642\u0627\u0628\u0644\u06cc\u062a \u062a\u0639\u0627\u0645\u0644 \u0628\u0627 \u06a9\u0627\u0631\u0628\u0631 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u0634\u0648\u062f.<\/span><\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">self.addEventListener( <\/span><span style=\"font-weight: 400;\">&#8220;push&#8221;<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">function<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\"> event <\/span><span style=\"font-weight: 400;\">){<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">console<\/span><span style=\"font-weight: 400;\">.log( <\/span><span style=\"font-weight: 400;\">&#8220;WORKER: Received notification&#8221;<\/span><span style=\"font-weight: 400;\">, event.data );<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">});<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><b>\u06f3- Manifest:\u00a0<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 PWA \u0645\u0627\u0646\u0646\u062f Native App\u0647\u0627 \u0642\u0627\u0628\u0644\u06cc\u062a \u0646\u0635\u0628 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u0646\u062f \u0627\u0632 Manifest \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645. \u0641\u0627\u06cc\u0644 \u200cManifest \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0628\u0627 \u0641\u0631\u0645\u062a JSON \u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u06a9\u0647 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u067e\u0631\u0627\u067e\u0631\u062a\u06cc\u200c\u0647\u0627\u06cc (key-value pair) \u0638\u0627\u0647\u0631 \u0648 \u0631\u0641\u062a\u0627\u0631 PWA \u0631\u0627 \u0628\u0627 \u062a\u0639\u0631\u06cc\u0641 \u0646\u0627\u0645\u060c \u062a\u0648\u0636\u06cc\u062d\u0627\u062a \u062f\u0631\u0628\u0627\u0631\u0647 \u0628\u0631\u0646\u0627\u0645\u0647\u060c icon \u0648 \u2026. \u0645\u0634\u062e\u0635 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0641\u0627\u06cc\u0644 Manifest \u0641\u0642\u0637 \u06a9\u0627\u0641\u06cc\u0633\u062a \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0644\u0627\u0632\u0645 \u0631\u0627 \u0628\u0635\u0648\u0631\u062a \u067e\u0631\u0627\u067e\u0631\u062a\u06cc (key-value) \u062f\u0631 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 JSON \u0642\u0631\u0627\u0631 \u062f\u0627\u062f\u0647 \u0648 \u0644\u06cc\u0646\u06a9 \u0622\u0646 \u0631\u0627 \u062f\u0631 \u0642\u0633\u0645\u062a head \u0635\u0641\u062d\u0647 html \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u0645.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">&lt;link rel=<\/span><span style=\"font-weight: 400;\">&#8220;manifest&#8221;<\/span><span style=\"font-weight: 400;\"> href=<\/span><span style=\"font-weight: 400;\">&#8220;\/manifest.json&#8221;<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0631\u0627\u06cc \u0641\u0627\u06cc\u0644 Manifest \u062d\u062f\u0627\u0642\u0644 \u0628\u0627\u06cc\u062f \u0627\u06cc\u0646 \u0633\u0647 \u067e\u0631\u0627\u067e\u0631\u062a\u06cc \u0631\u0627 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u0645:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">{<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;name&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;My PWA&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;lang&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;en-US&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;start_url&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;\/&#8221;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">}<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u06a9\u0647 \u0628\u0647 \u062a\u0631\u062a\u06cc\u0628 \u0634\u0627\u0645\u0644 \u0646\u0627\u0645 \u0628\u0631\u0646\u0627\u0645\u0647\u060c \u0632\u0628\u0627\u0646 \u0622\u0646 \u0648 URL \u0627\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0645\u0648\u0642\u0639 launch \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0647 \u0622\u0646 navigate \u0634\u0648\u062f\u060c \u0645\u06cc\u200c\u0628\u0627\u0634\u062f.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>\u0645\u0646\u0638\u0648\u0631 \u0627\u0632 Offline Support \u0628\u0648\u062f\u0646 PWA \u0686\u06cc\u0633\u062a\u061f<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u062a\u0641\u0627\u0648\u062a \u06a9\u0644\u06cc\u062f\u06cc \u0628\u06cc\u0646 Native App \u0648 Web \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0628\u0647 Network \u0627\u0633\u062a. \u0648\u0642\u062a\u06cc \u06a9\u0647 Network \u062f\u0631 \u062f\u0633\u062a\u0631\u0633 \u0646\u06cc\u0633\u062a\u060c Web \u06a9\u0627\u0631\u0627\u06cc\u06cc \u0646\u062f\u0627\u0631\u062f. \u0627\u06cc\u0646 \u062f\u0631\u062d\u0627\u0644\u06cc\u0633\u062a \u06a9\u0647 \u062f\u0631 PWA \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0642\u0627\u0628\u0644\u06cc\u062a Caching \u06a9\u0647 \u062a\u0648\u0633\u0637 Service Worker\u200c\u0647\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 Request Intercepting \u067e\u06cc\u0627\u062f\u0647\u200c\u0633\u0627\u0632\u06cc \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u062a\u062c\u0631\u0628\u0647 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0645\u0646\u0627\u0633\u0628 \u0628\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Service Worker\u200c\u200c\u0647\u0627 \u0628\u0631\u0627\u06cc Cache \u06a9\u0631\u062f\u0646 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0631\u0648\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u06a9\u0627\u0628\u0631 \u062f\u0648 \u06af\u0632\u06cc\u0646\u0647 \u062f\u0627\u0631\u062f:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u200c\u200cCacheStorage: \u06cc\u06a9 API \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0631\u062f\u0646 network request\/response \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0627\u06cc\u0646 API \u062a\u0648\u0633\u0637 Service Worker \u0648 Thread \u0627\u0635\u0644\u06cc \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0631\u0646\u0627\u0645\u0647 \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633 \u0627\u0633\u062a \u0648 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0630\u062e\u06cc\u0631\u0647 \u0634\u062f\u0647 \u062f\u0631 Cache \u0631\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 Delete \u0648 Update \u06a9\u0631\u062f.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0IndexedDB: \u06cc\u06a9 API \u0628\u0631\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0631\u062f\u0646 \u062d\u062c\u0645 \u0632\u06cc\u0627\u062f\u06cc \u0627\u0632 structured data \u0634\u0627\u0645\u0644 \u0641\u0627\u06cc\u0644\u200c\u0647\u0627 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f. IndexedDB \u06cc\u06a9 object-oriented \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u0627\u0633\u062a \u06a9\u0647 \u0627\u0632 (key-value pairs) \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648\u00a0 \u0627\u06cc\u062f\u0647\u200c\u0622\u0644 \u0628\u0631\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u0633\u0627\u0632\u06cc \u200casset\u0647\u0627 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u0628\u0631\u0627\u06cc cache \u06a9\u0631\u062f\u0646 \u0628\u0627 \u0633\u0647 \u0633\u0648\u0627\u0644 \u0645\u0648\u0627\u062c\u0647 \u0645\u06cc\u200c\u0634\u0648\u06cc\u0645:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u00a0\u0686\u0647 \u0686\u06cc\u0632\u06cc \u0631\u0627 \u0628\u0627\u06cc\u062f cache \u06a9\u0631\u062f\u061f<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0686\u0647 \u0632\u0645\u0627\u0646\u06cc \u0628\u0627\u06cc\u062f cache \u06a9\u0631\u062f\u061f (\u062f\u0631 \u0632\u0645\u0627\u0646 \u0646\u0635\u0628\u060c \u0641\u0639\u0627\u0644 \u06a9\u0631\u062f\u0646 \u0648 \u06cc\u0627 fetch event)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0686\u0637\u0648\u0631 fetch request \u0631\u0627 \u0628\u0627\u06cc\u062f \u0647\u0646\u062f\u0644 \u06a9\u0631\u062f\u061f (cache first, network first , a combination)<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">\u0627\u0633\u062a\u0631\u0627\u062a\u0698\u06cc \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0628\u0631\u0627\u06cc cache \u06a9\u0631\u062f\u0646 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u06a9\u0647 \u0686\u0646\u062f \u0646\u0645\u0648\u0646\u0647 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0647\u0645\u0631\u0627\u0647 \u06a9\u062f \u0628\u0631\u0631\u0633\u06cc \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">cache \u06a9\u0631\u062f\u0646 \u062f\u0631 \u0632\u0645\u0627\u0646 \u0646\u0635\u0628:<\/span><\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">\/\/ named cache in Cache Storage<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> CACHE_NAME = <\/span><span style=\"font-weight: 400;\">&#8216;devtools-tips-v3&#8217;<\/span><span style=\"font-weight: 400;\">;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\/\/ list of requests whose responses will be pre-cached at install<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> INITIAL_CACHED_RESOURCES = [<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/offline\/&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/assets\/style.css&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/assets\/share.js&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/assets\/logo.png&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 ];<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\/\/ install event handler (note async operation)<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\/\/ opens named cache, pre-caches identified resources above<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">self.addEventListener(<\/span><span style=\"font-weight: 400;\">&#8216;install&#8217;<\/span><span style=\"font-weight: 400;\">, event =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 event.waitUntil((<\/span><span style=\"font-weight: 400;\">async<\/span><span style=\"font-weight: 400;\"> (<\/span><span style=\"font-weight: 400;\">) =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> cache = <\/span><span style=\"font-weight: 400;\">await<\/span><span style=\"font-weight: 400;\"> caches.open(CACHE_NAME);<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 cache.addAll(INITIAL_CACHED_RESOURCES);<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 })());<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">});<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0627\u0633\u062a\u0631\u0627\u062a\u0698\u06cc cache-first : \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0648\u0631\u062f Service Worker \u067e\u0627\u0633\u062e \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u0631\u0627 \u062f\u0631 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0630\u062e\u06cc\u0631\u0647 \u0634\u062f\u0647 \u062f\u0631 cache \u062c\u0633\u062a\u062c\u0648 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u0627\u06af\u0631 \u067e\u0627\u0633\u062e \u0631\u0627 \u06cc\u0627\u0641\u062a \u0622\u0646 \u0631\u0627 \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f \u0648 \u0627\u06af\u0631 \u067e\u0627\u0633\u062e \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u0631\u0627 \u067e\u06cc\u062f\u0627 \u0646\u06a9\u0646\u062f\u060c \u0633\u0631\u0627\u063a network \u0645\u06cc\u200c\u0631\u0648\u062f.( \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0627\u0637\u0644\u0627\u0639\u0627\u062a cache \u0628\u0631\u0627\u06cc request\u200c\u0647\u0627\u06cc \u0622\u06cc\u0646\u062f\u0647 \u0627\u062e\u062a\u06cc\u0627\u0631\u06cc \u0627\u0633\u062a.)<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2833\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f3.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f3.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f3-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f3-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f3-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f3-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f3-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">\/\/ We have a cache-first strategy, <\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\/\/ where we look for resources in the cache first<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\/\/ and only on the network if this fails.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">self.addEventListener(<\/span><span style=\"font-weight: 400;\">&#8216;fetch&#8217;<\/span><span style=\"font-weight: 400;\">, event =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 event.respondWith((<\/span><span style=\"font-weight: 400;\">async<\/span><span style=\"font-weight: 400;\"> (<\/span><span style=\"font-weight: 400;\">) =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> cache = <\/span><span style=\"font-weight: 400;\">await<\/span><span style=\"font-weight: 400;\"> caches.open(CACHE_NAME);<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">\/\/ Try the cache first.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> cachedResponse = <\/span><span style=\"font-weight: 400;\">await<\/span><span style=\"font-weight: 400;\"> cache.match(event.request);<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">if<\/span><span style=\"font-weight: 400;\"> (cachedResponse !== <\/span><span style=\"font-weight: 400;\">undefined<\/span><span style=\"font-weight: 400;\">) {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">\/\/ Cache hit, let&#8217;s send the cached resource.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">return<\/span><span style=\"font-weight: 400;\"> cachedResponse;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 } <\/span><span style=\"font-weight: 400;\">else<\/span><span style=\"font-weight: 400;\"> {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">\/\/ Nothing in cache, let&#8217;s go to the network.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return<\/span> <span style=\"font-weight: 400;\">fetch(event.request)<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 }<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 }<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">}<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0627\u0633\u062a\u0631\u0627\u062a\u0698\u06cc network-first: \u0627\u06cc\u0646 \u0645\u0648\u0631\u062f \u0628\u0631\u0639\u06a9\u0633 \u0645\u0648\u0631\u062f \u0642\u0628\u0644\u00a0 Service Worker \u0627\u0628\u062a\u062f\u0627 \u0633\u0631\u0627\u063a network \u0645\u06cc\u200c\u0631\u0648\u062f \u0648 \u0627\u06af\u0631 network \u0642\u0637\u0639 \u0628\u0627\u0634\u062f\u060c \u0633\u0631\u0627\u063a cache \u0645\u06cc\u200c\u0631\u0648\u062f.<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2832\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f4.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f4.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f4-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f4-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f4-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f4-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f4-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">self.addEventListener(<\/span><span style=\"font-weight: 400;\">&#8220;fetch&#8221;<\/span><span style=\"font-weight: 400;\">, event =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 event.respondWith(<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 fetch(event.request)<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 .catch(<\/span><span style=\"font-weight: 400;\">error<\/span><span style=\"font-weight: 400;\"> =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">return<\/span><span style=\"font-weight: 400;\"> caches.match(event.request) ;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 })<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 );<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">});<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0627\u0633\u062a\u0631\u0627\u062a\u0698\u06cc \u062a\u0631\u06a9\u06cc\u0628 (network-first, cache-first): \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0648\u0631\u062f \u0641\u0648\u0631\u0627 \u067e\u0627\u0633\u062e \u0627\u0632 cache \u0628\u0631\u06af\u0631\u062f\u0627\u0646\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u0633\u067e\u0633 network \u0628\u0631\u0627\u06cc \u0628\u0647 \u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0645\u062d\u062a\u0648\u0627\u06cc cache \u0686\u06a9 \u0645\u06cc\u200c\u0634\u0648\u062f \u0648 \u0627\u06af\u0631 \u067e\u0627\u0633\u062e \u0645\u0648\u0631\u062f\u0646\u0638\u0631 \u062f\u0631 cache \u06cc\u0627\u0641\u062a \u0634\u0648\u062f\u060c \u0628\u0627 \u0645\u062d\u062a\u0648\u0627\u06cc \u062c\u062f\u06cc\u062f \u06af\u0631\u0641\u062a\u0647 \u0634\u062f\u0647 \u0627\u0632 network \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u0645\u06cc\u200c\u0634\u0648\u062f \u062a\u0627 \u0628\u0631\u0627\u06cc request \u0628\u0639\u062f\u06cc \u0627\u0632 \u0645\u062d\u062a\u0648\u0627\u06cc \u0628\u0647\u200c\u0631\u0648\u0632\u0634\u062f\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0627\u06cc\u0646 \u0627\u0633\u062a\u0631\u0627\u062a\u0698\u06cc \u0645\u0632\u06cc\u062a \u067e\u0627\u0633\u062e \u0633\u0631\u06cc\u0639 \u0627\u0632 cache \u0648 \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0622\u0646 \u062f\u0631 \u067e\u0633 \u0632\u0645\u06cc\u0646\u0647 \u0631\u0627 \u062f\u0627\u0631\u062f.<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2831\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f5.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f5.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f5-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f5-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f5-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f5-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f5-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">self.addEventListener(<\/span><span style=\"font-weight: 400;\">&#8220;fetch&#8221;<\/span><span style=\"font-weight: 400;\">, event =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> event.respondWith(<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 caches.match(event.request).then(<\/span><span style=\"font-weight: 400;\">cachedResponse<\/span><span style=\"font-weight: 400;\"> =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> networkFetch = fetch(event.request).then(<\/span><span style=\"font-weight: 400;\">response<\/span><span style=\"font-weight: 400;\"> =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">\/\/ update the cache with a clone of the network response<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 caches.open(CACHE_NAME).then(<\/span><span style=\"font-weight: 400;\">cache<\/span><span style=\"font-weight: 400;\"> =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 cache.put(event.request, response.clone());<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 });<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 });<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">\/\/ prioritize cached response over network<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">return<\/span><span style=\"font-weight: 400;\"> cachedResponse || networkFetch;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 }<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> )<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">)<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">});<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><b>\u0646\u062d\u0648\u0647 \u062a\u0628\u062f\u06cc\u0644 \u06cc\u06a9 \u0648\u0628\u0633\u0627\u06cc\u062a \u0645\u0639\u0645\u0648\u0644\u06cc \u0628\u0647 PWA:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0645\u0646 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u06a9\u0647 \u0634\u0627\u0645\u0644 (html, css, JavaScript) \u0627\u0633\u062a \u0648 \u062d\u062f\u0648\u062f \u0633\u0647 \u0633\u0627\u0644 \u067e\u06cc\u0634 \u0628\u0631\u0627\u06cc \u062a\u0645\u0631\u06cc\u0646 html \u0648 css \u0627\u0646\u062c\u0627\u0645 \u062f\u0627\u062f\u0647 \u0628\u0648\u062f\u0645 \u0631\u0627 \u0628\u0647 PWA \u062a\u0628\u062f\u06cc\u0644 \u0645\u06cc\u200c\u06a9\u0646\u0645 \u0648 \u0645\u0631\u0627\u062d\u0644 \u0622\u0646 \u0631\u0627 \u062a\u0648\u0636\u06cc\u062d \u0645\u06cc\u200c\u062f\u0647\u0645.\u00a0 \u0644\u0627\u0632\u0645 \u0628\u0647 \u0630\u06a9\u0631 \u0627\u0633\u062a \u06a9\u0647 PWA \u0647\u06cc\u0686 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0628\u0647 UI Framework \u0645\u062b\u0644 Vue.js \u060cReactjs \u0648 \u06cc\u0627 Angular \u0646\u062f\u0627\u0631\u062f \u0648 \u062a\u0646\u0647\u0627 \u06a9\u0627\u0641\u06cc\u0633\u062a \u06a9\u0627\u0645\u067e\u0648\u0646\u0646\u062a\u200c\u0647\u0627\u06cc \u0645\u0630\u06a9\u0648\u0631 \u0645\u0648\u062c\u0648\u062f \u0628\u0627\u0634\u0646\u062f. (\u0644\u06cc\u0646\u06a9 \u06af\u06cc\u062a\u200c\u0647\u0627\u0628 \u067e\u0631\u0648\u0698\u0647: <\/span><a href=\"https:\/\/github.com\/NaserAhadi\/food-recipe\"><span style=\"font-weight: 400;\">https:\/\/github.com\/NaserAhadi\/food-recipe<\/span><\/a><span style=\"font-weight: 400;\">)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0645\u0631\u062d\u0644\u0647 \u0627\u0648\u0644: \u0627\u06cc\u062c\u0627\u062f \u0641\u0627\u06cc\u0644 Manifest<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0627\u0628\u062a\u062f\u0627 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 Manifest \u0628\u0647 \u0641\u0631\u0645\u062a json \u062f\u0631 root \u067e\u0631\u0648\u0698\u0647 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u0648 \u067e\u0631\u0627\u067e\u0631\u062a\u06cc\u200c\u0647\u0627\u06cc \u0622\u0646 \u0631\u0627 \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645. \u0641\u0627\u06cc\u0644 Manifest \u067e\u0631\u0648\u0698\u0647 \u0645\u0630\u06a9\u0648\u0631 \u0628\u0647 \u0642\u0631\u0627\u0631 \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">{<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;lang&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;en-us&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;name&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;Food Recipes App&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;short_name&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;Food-Recipes&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;description&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;A basic Food Recipes application Which show how cook delicious food&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;start_url&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;\/&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;background_color&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;#2f3d58&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;theme_color&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;#2f3d58&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;orientation&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;any&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;display&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;standalone&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;icons&#8221;: [<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8220;src&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;.\/images\/chef-icon.png&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8220;sizes&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;\u06f6\u06f0\u06f0&#215;\u06f6\u06f0\u06f0&#8221;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 }<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 ]<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">}<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u0644\u06cc\u0646\u06a9 \u0641\u0627\u06cc\u0644 Manifest \u0631\u0627 \u062f\u0631 \u0635\u0641\u062d\u0647 html \u062f\u0631 \u0642\u0633\u0645\u062a <\/span><span style=\"font-weight: 400;\">\u062a\u06af<\/span><span style=\"font-weight: 400;\"> head \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u062f\u0647\u06cc\u0645.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">&lt;link rel=<\/span><span style=\"font-weight: 400;\">&#8220;manifest&#8221;<\/span><span style=\"font-weight: 400;\"> href=<\/span><span style=\"font-weight: 400;\">&#8220;\/manifest.json&#8221;<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u0645\u0631\u062d\u0644\u0647 \u062f\u0648\u0645: \u0627\u06cc\u062c\u0627\u062f Service Worker \u0648 Register \u0622\u0646<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u06af\u0641\u062a\u0647 \u0634\u062f \u0641\u0627\u06cc\u0644 Service Worker \u0631\u0627 \u0628\u0627 \u0646\u0627\u0645 sw.js \u062f\u0631 root \u067e\u0631\u0648\u0698\u0647 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u062a\u0627 \u062a\u0645\u0627\u0645 Request\u200c\u0647\u0627\u06cc \u0635\u0641\u062d\u0627\u062a\u06cc \u06a9\u0647 \u062f\u0631 Scope \u062e\u0648\u062f \u0642\u0631\u0627\u0631 \u062f\u0627\u0631\u0646\u062f \u0631\u0627 \u0631\u0647\u06af\u06cc\u0631\u06cc \u0648 \u0645\u062f\u06cc\u0631\u06cc\u062a \u06a9\u0646\u062f. \u0641\u0627\u06cc\u0644 sw.js \u062f\u0631 install event \u0635\u0641\u062d\u0647 html\u060c \u0641\u0627\u06cc\u0644 main.js\u060c \u0641\u0627\u06cc\u0644 style.css \u0648 \u0639\u06a9\u0633\u200c\u0647\u0627 \u0631\u0627 cache \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0647\u0645\u0686\u0646\u06cc\u0646 \u0628\u0627 fetch event \u0647\u0631 \u0628\u0627\u0631 \u06a9\u0647 request \u0628\u0647 \u0633\u0645\u062a Server \u0641\u0631\u0633\u062a\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u0622\u0646 \u0631\u0627 Intercept \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u0633\u062a\u0631\u0627\u062a\u0698\u06cc cache-first \u06a9\u0647 \u062f\u0631 \u06a9\u062f \u067e\u06cc\u0627\u062f\u0647\u200c\u0633\u0627\u0632\u06cc \u0634\u062f\u0647\u060c\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Service Worker \u0627\u0637\u0644\u0627\u0639\u0627\u062a Cache \u0634\u062f\u0647 \u0631\u0627 \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f\u060c \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0631 \u0645\u0648\u0627\u0642\u0639 \u0622\u0641\u0644\u0627\u06cc\u0646 \u062a\u062c\u0631\u0628\u0647 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0645\u0646\u0627\u0633\u0628 \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc\u200c\u062f\u0647\u062f.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> CACHE_NAME = <\/span><span style=\"font-weight: 400;\">`food-recipes`<\/span><span style=\"font-weight: 400;\">;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\/\/ Use the install event to pre-cache all initial resources.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">self.addEventListener(<\/span><span style=\"font-weight: 400;\">&#8216;install&#8217;<\/span><span style=\"font-weight: 400;\">, event =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> event.waitUntil((<\/span><span style=\"font-weight: 400;\">async<\/span><span style=\"font-weight: 400;\"> (<\/span><span style=\"font-weight: 400;\">) =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> cache = <\/span><span style=\"font-weight: 400;\">await<\/span><span style=\"font-weight: 400;\"> caches.open(CACHE_NAME);<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 cache.addAll([<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/main.js&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/style.css&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/images\/chef-favicon.png&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/images\/chef-icon.png&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/images\/curry.png&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/images\/noodles.png&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">&#8216;\/images\/stew.png&#8217;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 ]);<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> })());<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">});<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">self.addEventListener(<\/span><span style=\"font-weight: 400;\">&#8216;fetch&#8217;<\/span><span style=\"font-weight: 400;\">, event =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> event.respondWith((<\/span><span style=\"font-weight: 400;\">async<\/span><span style=\"font-weight: 400;\"> (<\/span><span style=\"font-weight: 400;\">) =&gt; {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> cache = <\/span><span style=\"font-weight: 400;\">await<\/span><span style=\"font-weight: 400;\"> caches.open(CACHE_NAME);<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">\/\/ Get the resource from the cache.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> cachedResponse = <\/span><span style=\"font-weight: 400;\">await<\/span><span style=\"font-weight: 400;\"> cache.match(event.request);<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">if<\/span><span style=\"font-weight: 400;\"> (cachedResponse) {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">return<\/span><span style=\"font-weight: 400;\"> cachedResponse;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 } <\/span><span style=\"font-weight: 400;\">else<\/span><span style=\"font-weight: 400;\"> {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">try<\/span><span style=\"font-weight: 400;\"> {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">\/\/ If the resource was not in the cache, try the network.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">const<\/span><span style=\"font-weight: 400;\"> fetchResponse = <\/span><span style=\"font-weight: 400;\">await<\/span><span style=\"font-weight: 400;\"> fetch(event.request);<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">\/\/ Save the resource in the cache and return it.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 cache.put(event.request, fetchResponse.clone());<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">return<\/span><span style=\"font-weight: 400;\"> fetchResponse;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 } <\/span><span style=\"font-weight: 400;\">catch<\/span><span style=\"font-weight: 400;\"> (e) {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 <\/span><span style=\"font-weight: 400;\">\/\/ The network failed.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 }<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 }<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> })());<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">});<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">\u0628\u0631\u0627\u06cc \u062b\u0628\u062a Service Worker \u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u0627\u0646\u062a\u0647\u0627\u06cc \u062a\u06af body \u062f\u0631 \u0635\u0641\u062d\u0647 html \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u062f\u0647\u06cc\u0645:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">&lt;<\/span><span style=\"font-weight: 400;\">script<\/span><span style=\"font-weight: 400;\">&gt;<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 <\/span><span style=\"font-weight: 400;\">if<\/span><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&#8216;serviceWorker&#8217;<\/span> <span style=\"font-weight: 400;\">in<\/span><span style=\"font-weight: 400;\"> navigator) {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 navigator.serviceWorker.register(<\/span><span style=\"font-weight: 400;\">&#8216;\/sw.js&#8217;<\/span><span style=\"font-weight: 400;\">, { scope: <\/span><span style=\"font-weight: 400;\">&#8216;\/&#8217;<\/span><span style=\"font-weight: 400;\"> });<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 }<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">&lt;<\/span><span style=\"font-weight: 400;\">\/script<\/span><span style=\"font-weight: 400;\">&gt;<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u0645\u0631\u062d\u0644\u0647 \u0633\u0648\u0645: \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 local web server<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0645\u0646 \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0647 \u062c\u0627\u06cc Deploy \u0622\u0646 \u0631\u0648\u06cc Web Server \u0627\u0632 http-server \u0644\u0627\u06cc\u0628\u0631\u0631\u06cc Node.js \u06a9\u0647 local web server \u0627\u0633\u062a\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f\u0645. \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0631 URL \u0647\u0627\u06cc\u06cc local web server \u062f\u0631 \u0627\u062e\u062a\u06cc\u0627\u0631 \u0645\u0627 \u0645\u06cc\u200c\u06af\u0630\u0627\u0631\u062f \u0642\u0627\u0628\u0644 \u062f\u0633\u062a\u0631\u0633 \u0627\u0633\u062a. \u0628\u0631\u0627\u06cc \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">npx http-server\u00a0\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0631 <\/span><a href=\"http:\/\/localhost:8080\"><span style=\"font-weight: 400;\">http:\/\/localhost:8080<\/span><\/a> <span style=\"font-weight: 400;\">\u00a0\u0648 \u062f\u06cc\u06af\u0631 URL \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0628\u0647 \u0645\u0627 \u0645\u06cc\u200c\u062f\u0647\u062f \u0642\u0627\u0628\u0644 \u0627\u062c\u0631\u0627\u0633\u062a. \u0628\u0631\u0627\u06cc \u0647\u062f\u0641 Debugging \u0645\u0631\u0648\u0631\u06af\u0631\u0647\u0627 \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc\u200c\u062f\u0647\u0646\u062f localhost web server \u0627\u0632 PWA \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0646\u062f \u062d\u062a\u06cc \u0628\u062f\u0648\u0646 \u067e\u0631\u0648\u062a\u06a9\u0644 HTTPS.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0646\u0635\u0628 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0647 \u0645\u062d\u0636 \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0634\u06a9\u0644 \u06f5- \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2830\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f6.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f6.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f6-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f6-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f6-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f6-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f6-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2829\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f7.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f7.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f7-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f7-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f7-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f7-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f7-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2828\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f8.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f8.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f8-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f8-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f8-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f8-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f8-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2840\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f9.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f9.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f9-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f9-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f9-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f9-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f9-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2838\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f0.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f0.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f0-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f0-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f0-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f0-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f0-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/span><\/p>\n<p><b>\u062a\u0628\u062f\u06cc\u0644 \u200cPWA \u0628\u0647 TWA:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u0642\u0628\u0644 \u0627\u0632 \u0647\u0631 \u0686\u06cc\u0632 \u0644\u0627\u0632\u0645 \u0628\u0647 \u0630\u06a9\u0631 \u0627\u0633\u062a <\/span><b>Trusted Web Activities<\/b><span style=\"font-weight: 400;\"> \u06cc\u0627 TWA \u0631\u0627\u0647\u06cc \u0627\u0633\u062a \u0628\u0631\u0627\u06cc \u0627\u0646\u062a\u0634\u0627\u0631 PWA \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 APK \u062f\u0631 App Store. \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 APK \u0627\u0632 PWA \u0645\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u0645 \u0627\u0632 \u0627\u0628\u0632\u0627\u0631 \u0622\u0646\u0644\u0627\u06cc\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0622\u0645\u0627\u062f\u0647 \u0628\u0631\u0627\u06cc \u0627\u0646\u062a\u0634\u0627\u0631 \u0622\u0646 \u062f\u0631 App Store \u0645\u06cc\u200c\u0628\u0627\u0634\u062f \u0648 \u0646\u06cc\u0627\u0632\u06cc \u0628\u0647 \u0646\u0635\u0628 Android Studio \u0631\u0648\u06cc \u0633\u06cc\u0633\u062a\u0645 \u0646\u062f\u0627\u0631\u06cc\u0645.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0627\u0646\u062a\u0634\u0627\u0631 PWA \u062f\u0631 App Store \u0642\u0627\u0628\u0644\u06cc\u062a \u0627\u06a9\u062a\u0634\u0627\u0641 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0628\u0627\u0644\u0627 \u0645\u06cc\u200c\u0628\u0631\u062f \u0628\u0637\u0648\u0631\u06cc\u06a9\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0639\u0644\u0627\u0648\u0647 \u0628\u0631 \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0627 URL \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631\u0647\u0627\u060c \u200c\u200c\u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0622\u0646 \u0631\u0627 \u0628\u0627 \u062c\u0633\u062a\u062c\u0648 \u062f\u0631 App Store\u0647\u0627 \u067e\u06cc\u062f\u0627 \u0648 \u0646\u0635\u0628 \u06a9\u0646\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0645\u0631\u0627\u062d\u0644 \u0627\u06cc\u062c\u0627\u062f \u200cTWA:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0628\u0647 \u0633\u0627\u06cc\u062a <\/span><a href=\"https:\/\/www.pwabuilder.com\/\"><span style=\"font-weight: 400;\">https:\/\/www.pwabuilder.com<\/span><\/a><span style=\"font-weight: 400;\"> \u0645\u06cc\u200c\u0631\u0648\u06cc\u0645 \u0648 URL \u0628\u0631\u0646\u0627\u0645\u0647 PWA \u0631\u0627 \u0648\u0627\u0631\u062f \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u0648 \u062f\u06a9\u0645\u0647 start \u0631\u0627 \u0645\u06cc\u200c\u0632\u0646\u06cc\u0645. \u06a9\u0647 \u0633\u0627\u06cc\u062a PWA \u0631\u0627 \u0627\u0631\u0632\u06cc\u0627\u0628\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u067e\u06cc\u0634\u0646\u0647\u0627\u062f\u0627\u062a\u06cc \u0628\u0631\u0627\u06cc \u0628\u0647\u0628\u0648\u062f Service Worker \u0648 Manifest \u0645\u06cc\u200c\u062f\u0647\u062f.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0631\u0648\u06cc \u062f\u06a9\u0645\u0647 Package For Stores \u06a9\u0644\u06cc\u06a9 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u0648 \u067e\u06a9\u06cc\u062c \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 Android \u0631\u0627 \u062f\u0627\u0646\u0644\u0648\u062f \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u067e\u06a9\u06cc\u062c \u062f\u0627\u0646\u0644\u0648\u062f \u0634\u062f\u0647 \u0631\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0631\u0648\u06cc \u06af\u0648\u0634\u06cc \u0627\u0646\u062f\u0631\u0648\u06cc\u062f \u0646\u0635\u0628 \u0648 \u062a\u0633\u062a \u06a9\u0631\u062f.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0628\u0631\u0627\u06cc \u0627\u0646\u062a\u0634\u0627\u0631 TWA \u062f\u0631 App Store\u060c \u0641\u0627\u06cc\u0644 <\/span><span style=\"font-weight: 400;\">assetlinks.json<\/span><span style=\"font-weight: 400;\"> \u0631\u0627 \u062f\u0631 \u0648\u0628\u0633\u0627\u06cc\u062a \u062f\u0631 \u0645\u0633\u06cc\u0631 \u0632\u06cc\u0631 Deploy \u06a9\u0646\u06cc\u062f.\u00a0<\/span><\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">&lt;HOST_URL&gt;\/.well-known\/assetlinks.json<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">\u0627\u06cc\u0646 \u0641\u0627\u06cc\u0644 \u0628\u0627 \u0627\u0646\u0637\u0628\u0627\u0642 fingerprints \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f \u0634\u0645\u0627 \u0635\u0627\u062d\u0628 PWA \u0648\u00a0 TWA \u0647\u0633\u062a\u06cc\u062f \u0648 \u0647\u0645\u0686\u0646\u06cc\u0646 \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc\u200c\u062f\u0647\u062f TWA \u062f\u0631 \u062d\u0627\u0644\u062a fullscreen \u0648 \u0628\u062f\u0648\u0646 browser UI \u0627\u062c\u0631\u0627 \u0634\u0648\u062f. \u0646\u0645\u0648\u0646\u0647\u200c\u0627\u06cc \u0627\u0632 \u0641\u0627\u06cc\u0644 <\/span><span style=\"font-weight: 400;\">assetlinks.json<\/span><span style=\"font-weight: 400;\"> :<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">[{<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;relation&#8221;: [<\/span><span style=\"font-weight: 400;\">&#8220;delegate_permission\/common.handle_all_urls&#8221;<\/span><span style=\"font-weight: 400;\">],<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 &#8220;target&#8221; : {<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8220;namespace&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;android_app&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8220;package_name&#8221;: <\/span><span style=\"font-weight: 400;\">&#8220;app.webboard.twa&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8220;sha256_cert_fingerprints&#8221;: [<\/span><span style=\"font-weight: 400;\">&#8220;\u06f9\u06f2:1C:08:E0:A6:4D:29:87:DF:70:3E:B4:0F:E9:0C:6D:D1:70:D0:8F:AD:97:29:64:EA:0A:69:A2:3F:27:C7:06&#8221;<\/span><span style=\"font-weight: 400;\">]<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> }<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">]<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><b>\u0628\u0631\u0631\u0633\u06cc \u062a\u0627\u062b\u06cc\u0631 (PWA, TWA) \u062f\u0631 \u062c\u0630\u0628 \u06a9\u0627\u0631\u0628\u0631 \u0628\u0631\u0627\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0628\u0631\u0646\u0627\u0645\u0647:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u0628\u0631\u0627\u06cc \u0628\u0631\u0631\u0633\u06cc \u0627\u06cc\u0646 \u0645\u0648\u0631\u062f \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u0634\u062e\u0635\u06cc \u06a9\u0647 \u062a\u0648\u0633\u0637 \u06cc\u06a9\u06cc \u0627\u0632 \u0647\u0645\u06a9\u0627\u0631\u0627\u0646\u0645 \u062f\u0631 \u0634\u0631\u06a9\u062a \u0648\u0646\u062f\u0627\u0631\u060c \u0622\u0642\u0627\u06cc \u062d\u0627\u0645\u062f \u0627\u0633\u062a\u0627\u062f\u06cc\u060c \u062a\u0648\u0633\u0639\u0647 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a \u0631\u0627 \u0645\u0648\u0631\u062f \u0645\u0637\u0627\u0644\u0639\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u062f\u0647\u06cc\u0645. \u0627\u06cc\u0646 \u067e\u0631\u0648\u0698\u0647 \u0628\u0627 \u0646\u0627\u0645 \u062a\u062c\u0627\u0631\u06cc &#8220;<\/span><a href=\"https:\/\/hamsadeha.ir\"><span style=\"font-weight: 400;\">\u0647\u0645\u0633\u0627\u062f\u0647\u200c\u0647\u0627<\/span><\/a><span style=\"font-weight: 400;\">&#8220;\u060c \u06cc\u06a9 \u0646\u0631\u0645\u200c\u0627\u0641\u0632\u0627\u0631 \u0645\u062f\u06cc\u0631\u06cc\u062a \u0633\u0627\u062e\u062a\u0645\u0627\u0646 \u0648 \u067e\u0631\u062f\u0627\u062e\u062a \u0634\u0627\u0631\u0698 \u0622\u0646\u0644\u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0627 \u0622\u0646 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u062b\u0628\u062a \u0648\u0627\u062d\u062f\u060c \u067e\u0631\u062f\u0627\u062e\u062a \u0642\u0628\u0648\u0636 \u0648 \u067e\u0631\u062f\u0627\u062e\u062a \u0634\u0627\u0631\u0698 \u0633\u0627\u062e\u062a\u0645\u0627\u0646 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0622\u0646\u0644\u0627\u06cc\u0646 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0648\u0628\u0633\u0627\u06cc\u062a \u067e\u0631\u0648\u0698\u0647 \u062f\u0631 \u062a\u0627\u0631\u06cc\u062e June 1, 2021 (\u0645\u0639\u0627\u062f\u0644 \u06f1\u06f1 \u062e\u0631\u062f\u0627\u062f \u0633\u0627\u0644 \u06f1\u06f4\u06f0\u06f0) \u0627\u0646\u062a\u0634\u0627\u0631 \u06cc\u0627\u0641\u062a\u0647 \u0627\u0633\u062a \u0648 \u062a\u0627 \u062a\u0627\u0631\u06cc\u062e<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0October 19, 2022 (\u0645\u0639\u0627\u062f\u0644 \u06f2\u06f7 \u0645\u0647\u0631 \u0633\u0627\u0644 \u06f1\u06f4\u06f0\u06f1) \u0628\u0647 (PWA, TWA) \u062a\u0628\u062f\u06cc\u0644 \u0646\u0634\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u062d\u062f\u0648\u062f\u0627 \u062f\u0631 \u0639\u0631\u0636 \u06f1\u06f6 \u0645\u0627\u0647 \u0645\u0637\u0627\u0628\u0642 \u062a\u0635\u0648\u06cc\u0631 \u0632\u06cc\u0631 \u06f5\u06f5\u06f5 \u06a9\u0627\u0631\u0628\u0631 \u0627\u0632 \u0627\u06cc\u0646 \u0648\u0628\u0633\u0627\u06cc\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0631\u062f\u0646\u062f.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2837\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f1.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f1.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f1-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f1-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f1-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f1-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f1-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/>\u0627\u0632 \u062a\u0627\u0631\u06cc\u062e October 20, 2022 (\u0645\u0639\u0627\u062f\u0644 \u06f2\u06f8 \u0645\u0647\u0631 \u0633\u0627\u0644 \u06f1\u06f4\u06f0\u06f1) \u0627\u06cc\u0646 \u0648\u0628\u0633\u0627\u06cc\u062a \u0628\u0647 PWA \u0648 \u200cTWA \u062a\u0628\u062f\u06cc\u0644 \u0648 \u062f\u0631 \u0628\u0627\u0632\u0627\u0631 \u0645\u0646\u062a\u0634\u0631 \u0634\u062f\u0647 \u0627\u0633\u062a. \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0645\u0637\u0627\u0628\u0642 \u062a\u0635\u0648\u06cc\u0631 \u0632\u06cc\u0631 \u0645\u06cc\u0628\u06cc\u0646\u06cc\u0645\u060c \u062a\u0639\u062f\u0627\u062f \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u062a\u0627 \u0628\u0647 \u0627\u0645\u0631\u0648\u0632\u060c \u062f\u0631 \u0639\u0631\u0636 \u062d\u062f\u0648\u062f\u0627 \u06f4 \u0645\u0627\u0647\u060c \u0627\u0632 \u06f5\u06f5\u06f5 \u06a9\u0627\u0631\u0628\u0631 \u0628\u0647 \u06f1\u06f1\u06f2\u06f9 \u06a9\u0627\u0631\u0628\u0631 \u0631\u0633\u06cc\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0646\u0634\u0627\u0646 \u062f\u0647\u0646\u062f\u0647 \u0631\u0634\u062f \u062f\u0648 \u0628\u0631\u0627\u0628\u0631\u06cc \u062f\u0631 \u0645\u062f\u062a \u0632\u0645\u0627\u0646 \u06a9\u0645 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2836\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f2.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f2.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f2-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f2-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f2-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f2-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f2-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2835\" src=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f3.jpg\" alt=\"\" width=\"2000\" height=\"1125\" srcset=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f3.jpg 2000w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f3-600x338.jpg 600w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f3-768x432.jpg 768w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f3-1536x864.jpg 1536w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f3-1200x675.jpg 1200w, https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1\u06f3-585x329.jpg 585w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PWA \u0686\u06cc\u0633\u062a\u061f \u062f\u0631 \u0633\u0627\u0644 \u06f2\u06f0\u06f1\u06f5 \u0639\u0628\u0627\u0631\u062a Progressive Web App \u06cc\u0627 \u0647\u0645\u0627\u0646 PWA \u062a\u0648\u0633\u0637 \u06af\u0648\u06af\u0644 \u0645\u0639\u0631\u0641\u06cc \u0634\u062f. PWA\u0647\u0627 \u0648\u0628 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646\u200c\u0647\u0627\u06cc\u06cc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc\u200c\u0647\u0627\u06cc (JavaScript\u060c HTML\u060c CSS\u060c WebAssembly) \u0633\u0627\u062e\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0648 \u062a\u062c\u0631\u0628\u0647\u200c\u0627\u06cc \u0645\u0634\u0627\u0628\u0647 \u0628\u0627 Native App \u0631\u0627 \u062f\u0631 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. PWA\u0647\u0627 \u0628\u0627 \u0648\u062c\u0648\u062f&#8230;<\/p>\n","protected":false},"author":2,"featured_media":2839,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-2827","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-26"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA - \u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vandar.io\/blog\/pwa-\u0686\u06cc\u0633\u062a\/\" \/>\n<meta property=\"og:locale\" content=\"fa_IR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA - \u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631\" \/>\n<meta property=\"og:description\" content=\"PWA \u0686\u06cc\u0633\u062a\u061f \u062f\u0631 \u0633\u0627\u0644 \u06f2\u06f0\u06f1\u06f5 \u0639\u0628\u0627\u0631\u062a Progressive Web App \u06cc\u0627 \u0647\u0645\u0627\u0646 PWA \u062a\u0648\u0633\u0637 \u06af\u0648\u06af\u0644 \u0645\u0639\u0631\u0641\u06cc \u0634\u062f. PWA\u0647\u0627 \u0648\u0628 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646\u200c\u0647\u0627\u06cc\u06cc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc\u200c\u0647\u0627\u06cc (JavaScript\u060c HTML\u060c CSS\u060c WebAssembly) \u0633\u0627\u062e\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0648 \u062a\u062c\u0631\u0628\u0647\u200c\u0627\u06cc \u0645\u0634\u0627\u0628\u0647 \u0628\u0627 Native App \u0631\u0627 \u062f\u0631 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. PWA\u0647\u0627 \u0628\u0627 \u0648\u062c\u0648\u062f...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vandar.io\/blog\/pwa-\u0686\u06cc\u0633\u062a\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-19T14:36:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"1125\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u0648\u0646\u062f\u0627\u0631\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vandarpay\" \/>\n<meta name=\"twitter:site\" content=\"@vandarpay\" \/>\n<meta name=\"twitter:label1\" content=\"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u0648\u0646\u062f\u0627\u0631\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 \u062f\u0642\u06cc\u0642\u0647\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/\"},\"author\":{\"name\":\"\u0648\u0646\u062f\u0627\u0631\",\"@id\":\"https:\/\/vandar.io\/blog\/#\/schema\/person\/1ae51b87f41a1c9361c38cf9ba8a038d\"},\"headline\":\"\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA\",\"datePublished\":\"2023-04-19T14:36:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/\"},\"wordCount\":1006,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/vandar.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1.jpg\",\"articleSection\":[\"\u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646\"],\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/\",\"url\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/\",\"name\":\"\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA - \u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631\",\"isPartOf\":{\"@id\":\"https:\/\/vandar.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1.jpg\",\"datePublished\":\"2023-04-19T14:36:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#breadcrumb\"},\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#primaryimage\",\"url\":\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1.jpg\",\"contentUrl\":\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1.jpg\",\"width\":2000,\"height\":1125},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/vandar.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vandar.io\/blog\/#website\",\"url\":\"https:\/\/vandar.io\/blog\/\",\"name\":\"\u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631\",\"description\":\"\u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631\",\"publisher\":{\"@id\":\"https:\/\/vandar.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vandar.io\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fa-IR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/vandar.io\/blog\/#organization\",\"name\":\"\u0648\u0646\u062f\u0627\u0631\",\"url\":\"https:\/\/vandar.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\/\/vandar.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2022\/08\/cropped-icon-logo.png\",\"contentUrl\":\"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2022\/08\/cropped-icon-logo.png\",\"width\":512,\"height\":512,\"caption\":\"\u0648\u0646\u062f\u0627\u0631\"},\"image\":{\"@id\":\"https:\/\/vandar.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/vandarpay\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/vandar.io\/blog\/#\/schema\/person\/1ae51b87f41a1c9361c38cf9ba8a038d\",\"name\":\"\u0648\u0646\u062f\u0627\u0631\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\/\/vandar.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a404795778710cc7909763d108129e91813d476ba1e20ba9ff883f1230d17b1e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a404795778710cc7909763d108129e91813d476ba1e20ba9ff883f1230d17b1e?s=96&d=mm&r=g\",\"caption\":\"\u0648\u0646\u062f\u0627\u0631\"},\"url\":\"https:\/\/vandar.io\/blog\/author\/mahlaekrami\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA - \u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vandar.io\/blog\/pwa-\u0686\u06cc\u0633\u062a\/","og_locale":"fa_IR","og_type":"article","og_title":"\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA - \u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631","og_description":"PWA \u0686\u06cc\u0633\u062a\u061f \u062f\u0631 \u0633\u0627\u0644 \u06f2\u06f0\u06f1\u06f5 \u0639\u0628\u0627\u0631\u062a Progressive Web App \u06cc\u0627 \u0647\u0645\u0627\u0646 PWA \u062a\u0648\u0633\u0637 \u06af\u0648\u06af\u0644 \u0645\u0639\u0631\u0641\u06cc \u0634\u062f. PWA\u0647\u0627 \u0648\u0628 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646\u200c\u0647\u0627\u06cc\u06cc \u0647\u0633\u062a\u0646\u062f \u06a9\u0647 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc\u200c\u0647\u0627\u06cc (JavaScript\u060c HTML\u060c CSS\u060c WebAssembly) \u0633\u0627\u062e\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0648 \u062a\u062c\u0631\u0628\u0647\u200c\u0627\u06cc \u0645\u0634\u0627\u0628\u0647 \u0628\u0627 Native App \u0631\u0627 \u062f\u0631 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. PWA\u0647\u0627 \u0628\u0627 \u0648\u062c\u0648\u062f...","og_url":"https:\/\/vandar.io\/blog\/pwa-\u0686\u06cc\u0633\u062a\/","og_site_name":"\u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631","article_published_time":"2023-04-19T14:36:10+00:00","og_image":[{"width":2000,"height":1125,"url":"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1.jpg","type":"image\/jpeg"}],"author":"\u0648\u0646\u062f\u0627\u0631","twitter_card":"summary_large_image","twitter_creator":"@vandarpay","twitter_site":"@vandarpay","twitter_misc":{"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a":"\u0648\u0646\u062f\u0627\u0631","\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646":"16 \u062f\u0642\u06cc\u0642\u0647"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#article","isPartOf":{"@id":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/"},"author":{"name":"\u0648\u0646\u062f\u0627\u0631","@id":"https:\/\/vandar.io\/blog\/#\/schema\/person\/1ae51b87f41a1c9361c38cf9ba8a038d"},"headline":"\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA","datePublished":"2023-04-19T14:36:10+00:00","mainEntityOfPage":{"@id":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/"},"wordCount":1006,"commentCount":0,"publisher":{"@id":"https:\/\/vandar.io\/blog\/#organization"},"image":{"@id":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#primaryimage"},"thumbnailUrl":"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1.jpg","articleSection":["\u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646"],"inLanguage":"fa-IR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/","url":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/","name":"\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA - \u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631","isPartOf":{"@id":"https:\/\/vandar.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#primaryimage"},"image":{"@id":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#primaryimage"},"thumbnailUrl":"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1.jpg","datePublished":"2023-04-19T14:36:10+00:00","breadcrumb":{"@id":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#breadcrumb"},"inLanguage":"fa-IR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/"]}]},{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#primaryimage","url":"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1.jpg","contentUrl":"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2023\/04\/\u06f1.jpg","width":2000,"height":1125},{"@type":"BreadcrumbList","@id":"https:\/\/vandar.io\/blog\/pwa-%da%86%db%8c%d8%b3%d8%aa\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vandar.io\/blog\/"},{"@type":"ListItem","position":2,"name":"\u062a\u0648\u0633\u0639\u0647 \u200cPWA \u0648 \u062a\u0628\u062f\u06cc\u0644 \u0622\u0646 \u0628\u0647 TWA"}]},{"@type":"WebSite","@id":"https:\/\/vandar.io\/blog\/#website","url":"https:\/\/vandar.io\/blog\/","name":"\u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631","description":"\u0648\u0628\u0644\u0627\u06af \u0648\u0646\u062f\u0627\u0631","publisher":{"@id":"https:\/\/vandar.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vandar.io\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fa-IR"},{"@type":"Organization","@id":"https:\/\/vandar.io\/blog\/#organization","name":"\u0648\u0646\u062f\u0627\u0631","url":"https:\/\/vandar.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/vandar.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2022\/08\/cropped-icon-logo.png","contentUrl":"https:\/\/vandar.io\/blog\/wp-content\/uploads\/2022\/08\/cropped-icon-logo.png","width":512,"height":512,"caption":"\u0648\u0646\u062f\u0627\u0631"},"image":{"@id":"https:\/\/vandar.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/vandarpay"]},{"@type":"Person","@id":"https:\/\/vandar.io\/blog\/#\/schema\/person\/1ae51b87f41a1c9361c38cf9ba8a038d","name":"\u0648\u0646\u062f\u0627\u0631","image":{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/vandar.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a404795778710cc7909763d108129e91813d476ba1e20ba9ff883f1230d17b1e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a404795778710cc7909763d108129e91813d476ba1e20ba9ff883f1230d17b1e?s=96&d=mm&r=g","caption":"\u0648\u0646\u062f\u0627\u0631"},"url":"https:\/\/vandar.io\/blog\/author\/mahlaekrami\/"}]}},"_links":{"self":[{"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/posts\/2827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/comments?post=2827"}],"version-history":[{"count":1,"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/posts\/2827\/revisions"}],"predecessor-version":[{"id":2841,"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/posts\/2827\/revisions\/2841"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/media\/2839"}],"wp:attachment":[{"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/media?parent=2827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/categories?post=2827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vandar.io\/blog\/wp-json\/wp\/v2\/tags?post=2827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}