为何PSI移动端评分不受资源加载时长(onLoad事件)影响,而桌面端却受影响?
onLoad, But Desktop Scores Don't Great question! This discrepancy boils down to three core differences in how PSI evaluates performance for mobile vs. desktop environments, all tied to real-world user expectations and device capabilities:
User-centric performance prioritization for mobile
PSI’s mobile scoring leans heavily into Core Web Vitals—metrics like Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS)—which directly measure what users actually experience. TheonLoadevent fires when every single resource on the page (including non-critical ones like footer images or unused scripts) finishes loading. On mobile, users rarely wait for all those extra resources; they start interacting with the page as soon as key content is visible. So PSI downplaysonLoadfor mobile because it doesn’t align with how mobile users engage with pages.Simulated device/network profiles differ drastically
PSI runs mobile tests using a mid-tier mobile device (think Pixel 4) and a slow 3G network. In this environment,onLoadcan fire long after the page is usable—waiting for non-critical resources that don’t impact initial experience. For desktop, though, PSI uses a high-end device and fast broadband. Here,onLoadhappens much closer to when the page feels "fully loaded" to the user, so it still contributes to the overall score as a measure of complete page readiness.Google’s performance optimization philosophy
Google has long emphasized mobile-first design, which means prioritizing metrics that matter most to mobile users first. Since mobile users are more likely to abandon slow-loading pages beforeonLoadcompletes, focusing on early-stage performance (like LCP) makes more sense. Desktop users, by contrast, are often more patient and expect a fully loaded experience, soonLoadretains its weight in desktop scoring as a signal of complete page functionality.
内容的提问来源于stack exchange,提问作者PictureElement

