This article is part of the Digital Analogy series, which illustrates concepts using evocative imagery. These posts are adaptations of conversations with clients. They invite reflection or, rather, accelerate it. Each situation is different, and these analogies are not absolute truths.
This analogy relates to adding an iframe to an already heavy page. The underlying topic, which this client is beginning to explore, is page load and display speed.
Imagine that a web page loading and then displaying for the user, or more precisely, the client, is like moving to a new house.
Every time you add a box, it makes the load heavier.
There are small boxes and large ones.
An iframe is more like a large box.
If you’ve rented a Ford Transit, a powerful utility van, one more box won’t be a problem.
If you’re on a Vespa, it might make a difference.
The Transit is equivalent to fiber optic internet,
The Vespa, to a poor 3G or even Edge connection.
At the office or in a development agency, everyone has a Transit. In the real world, many are stuck with a Vespa.
Is it really reasonable to add another box for them?
This is the moment to insert a link to pagespeed.web.dev
It’s always possible to work around this issue by sending a friend with a second moped, which is equivalent to lazy loading: the iframe will load after the page has fully displayed. It’s still an extra box, but the user won’t feel its weight immediately.
Two things come from this.
Either it’s an element considered essential to the page’s objective. It’s up to us to ensure an integration that considers performance.
SEO note: For the iframe content to be excluded by Google, it needs to be dynamically loaded after the first user interaction (scroll) AND after the page has completely rendered.
Or it isn’t essential, and we add a link instead (obfuscated, perhaps?!).