{"id":5174,"date":"2023-01-20T07:19:53","date_gmt":"2023-01-20T07:19:53","guid":{"rendered":"https:\/\/www.epsilondelta.co\/blog\/?p=5174"},"modified":"2024-05-22T09:06:25","modified_gmt":"2024-05-22T09:06:25","slug":"monitoring-spa-pwa-using-gemini","status":"publish","type":"post","link":"https:\/\/www.epsilondelta.co\/blog\/monitoring-spa-pwa-using-gemini\/","title":{"rendered":"Monitoring SPA\/PWA using Gemini"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Traditional RUM tools Limitations<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Traditional RUM tools measure the core web vitals and other speed parameters for the HTML. In Single page Apps (SPA) and Progressive Web Apps (PWA), the browser sends an initial GET request to the server, which sends back a html file, Depending on the architecture, the browser either renders the page or makes an AJAX\/FETCH request for data, and the server responds by sending the data in json format. The data gets rendered on the client\u2019s screen through the javascript.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"600\" height=\"325\" src=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Application-7-1-600x325.png\" alt=\"SPA architecture image\" class=\"wp-image-5176\" loading=\"lazy\" srcset=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Application-7-1-600x325.png 600w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Application-7-1-300x162.png 300w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Application-7-1-768x416.png 768w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Application-7-1.png 874w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">However, from the second page onwards, there are only the ajax\/ fetch API calls which return the json object. The javascript in the memory will then render the page. This is also called &#8220;soft routing\u201d.&nbsp; Because there is no html downloaded from the server for second request onwards, traditional RUM tools aren\u2019t able to monitor the speed parameters of SPA and PWA websites loaded through the soft routing. For such pages, the traditional RUM tools will show the ajax\/ fetch api load times only, with no screen painting related data. However, Gemini measures these soft routes in the same way as a normal website. Gemini detects the First Contentful Paint (FCP) and the real user Speed Index in the soft operations as well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Monitoring SPA\/PWA soft route using Gemini<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As we see in the image below, Gemini users can track the Speed Index and First Contentful Paint (StartRender) of SPA and PWA similar to traditional webpages. Users can also select specifically the &#8220;soft route&#8221; options if they only want to track them.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"600\" height=\"362\" src=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Screenshot-2023-01-09-at-2.44.26-PM-2-600x362.png\" alt=\"First contentful paint gemini graph image\" class=\"wp-image-5183\" loading=\"lazy\" srcset=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Screenshot-2023-01-09-at-2.44.26-PM-2-600x362.png 600w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Screenshot-2023-01-09-at-2.44.26-PM-2-300x181.png 300w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Screenshot-2023-01-09-at-2.44.26-PM-2-768x463.png 768w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Screenshot-2023-01-09-at-2.44.26-PM-2-1536x926.png 1536w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/Screenshot-2023-01-09-at-2.44.26-PM-2.png 1642w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As we see in the image below, Gemini can directly show the percentage of load and soft route requests in a single graph. This is a good way of checking if SPA or PWA architecture is working as desired. More the percent of soft route pages, better the operational efficiency and faster the user experience.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"362\" height=\"400\" src=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/loadVsSoft-1-362x400.png\" alt=\"Gemini graph which shows both load and soft route\" class=\"wp-image-5177\" loading=\"lazy\" srcset=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/loadVsSoft-1-362x400.png 362w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/loadVsSoft-1-271x300.png 271w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/loadVsSoft-1.png 722w\" sizes=\"auto, (max-width: 362px) 100vw, 362px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As shown in the image below, Gemini also tracks ajax\/ fetch API requests and their real user load time. Depending on the requirement, users can choose between soft route, Load or all requests.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"541\" height=\"400\" src=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/fetchAj-1-541x400.png\" alt=\"Gemini ajax\/fetch API request graph\" class=\"wp-image-5179\" loading=\"lazy\" srcset=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/fetchAj-1-541x400.png 541w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/fetchAj-1-300x222.png 300w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/fetchAj-1-768x568.png 768w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/fetchAj-1-1536x1136.png 1536w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/fetchAj-1.png 1658w\" sizes=\"auto, (max-width: 541px) 100vw, 541px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Users can also track JavaScript errors from the soft routed operations, including the page name, with the choice of selecting between load, soft route, or all, as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"600\" height=\"301\" src=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/jsErr-1-600x301.png\" alt=\"Gemini JavaScript errors graph\" class=\"wp-image-5180\" loading=\"lazy\" srcset=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/jsErr-1-600x301.png 600w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/jsErr-1-300x151.png 300w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/jsErr-1-768x386.png 768w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/jsErr-1-1536x772.png 1536w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/jsErr-1-2048x1029.png 2048w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Gemini can also track blocking samples in SPA\/PWA soft routes, as we see in the image below. Depending on the requirement of users they can choose between Soft Route or Load or all requests.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"600\" height=\"297\" src=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/scatter-1-600x297.png\" alt=\"Gemini blocking samples only graph\" class=\"wp-image-5181\" loading=\"lazy\" srcset=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/scatter-1-600x297.png 600w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/scatter-1-300x148.png 300w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/scatter-1-768x380.png 768w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/scatter-1-1536x760.png 1536w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/scatter-1.png 1682w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Users can audit the page waterfall in the online user journey and detect page waterfall issues to correct the user experience with the choice of selecting between load, soft route, or both, as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"600\" height=\"244\" src=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/blockLine-1-600x244.png\" alt=\"Gemini waterfall view of the selected page\" class=\"wp-image-5182\" loading=\"lazy\" srcset=\"https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/blockLine-1-600x244.png 600w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/blockLine-1-300x122.png 300w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/blockLine-1-768x313.png 768w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/blockLine-1-1536x626.png 1536w, https:\/\/www.epsilondelta.co\/blog\/wp-content\/uploads\/2023\/01\/blockLine-1.png 1684w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www.epsilondelta.co\/blog\/monitoring-spa-pwa-using-gemini\/<br \/>\nMonitoring SPA\/PWA using Gemini &#8211; Epsilon delta 20<br \/>\nTraditional RUM tools Limitations Traditional RUM tools measure the core web vitals and other speed parameters for the HTML. In Single page Apps (SPA) and Progressive Web Apps (PWA), the browser sen\u2026<\/p>\n","protected":false},"author":2,"featured_media":6308,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[1],"tags":[99,111,110,112,101,109],"class_list":["post-5174","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sitespeedimprovementtipsonepsilondeltablog","tag-epsilondelta","tag-gemini","tag-pwa","tag-rum","tag-sitespeed","tag-spa"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/posts\/5174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/comments?post=5174"}],"version-history":[{"count":5,"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/posts\/5174\/revisions"}],"predecessor-version":[{"id":6309,"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/posts\/5174\/revisions\/6309"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/media\/6308"}],"wp:attachment":[{"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/media?parent=5174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/categories?post=5174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.epsilondelta.co\/blog\/wp-json\/wp\/v2\/tags?post=5174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}