Performance and Resilience: Stress-Testing Third Parties by CSS Wizardry

मैं Google डेवलपर दिवस के लिए कुछ हफ्ते पहले चीन में था और मैं अपने सभी क्यूआरकोड स्कैनर को दिखा रहा था, जब तक मैं ऑफ़लाइन नहीं जाता तब तक यह बहुत अच्छा काम कर रहा था। जब उपयोगकर्ता ऑफलाइन था (या आंशिक रूप से कनेक्ट) कैमरा शुरू नहीं होगा, जिसका मतलब था कि आप क्यूआर कोड को स्नैप नहीं कर सके। यह हुआ कि काम करने के लिए मुझे उम्र बढ़ गई, और यह पता चला कि मैं गलती से कैमरे को अपने 'ऑनलोड' ईवेंट में शुरू कर रहा था और Google Analytics अनुरोध समय-समय पर हल होगा और हल नहीं होगा। यह यह प्रतिबद्धता है जो इसे ठीक करता है

Because these types of assets block rendering, the browser will not paint anything to the screen until they have been downloaded (and executed/parsed). If the service that provides the file is offline, then that’s a lot of time that the browser has to spend trying to access the file, and during that period the user is left potentially looking at a blank screen. After a certain period has elapsed, the browser will eventually timeout and display the page without the asset(s) in question. How long is that certain period of time?

It’s 1 minute and 20 seconds.

If you have any render-blocking, critical, third party assets hosted on an external domain, you run the risk of showing users a blank page for 1.3 minutes.

Below, you’ll see the DOMContentLoaded and Load events on a site that has a render-blocking script hosted elsewhere. The browser was completely held up for 78 seconds, showing nothing at all until it ended up timing out.

पूर्ण पोस्ट पढ़ें

मैं आपको पद पढ़ने के लिए प्रोत्साहित करता हूं क्योंकि बहुत सारी अंतर्दृष्टि है।

About Me: Paul Kinlan

I lead the Chrome Developer Relations team at Google.

We want people to have the best experience possible on the web without having to install a native app or produce content in a walled garden.

Our team tries to make it easier for developers to build on the web by supporting every Chrome release, creating great content to support developers on, contributing to MDN, helping to improve browser compatibility, and some of the best developer tools like Lighthouse, Workbox, Squoosh to name just a few.