Sunday, July 20, 2025
News PouroverAI
Visit PourOver.AI
No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
News PouroverAI
No Result
View All Result

Testing the Performance of Social Media Embeds

December 4, 2023
in Front-Tech
Reading Time: 3 mins read
0 0
A A
0
Share on FacebookShare on Twitter


I’ve been writing and speaking about web sustainability quite a bit this past year. One thing I’ve done periodically for my talks is to test the data transfer size of various social media embeds — they’re pretty bad!

I first tested some YouTube embeds a couple of years ago while attempting to improve the site performance of a client at the agency I worked for. At the time, embedding a YouTube video on a webpage caused ~600kb of JavaScript to be downloaded. Eek! It gets worse though. In May this year, embedding that same video resulted in more than 800kb of JS. Pretty disappointing that it had actually increased, and by a not-insignificant amount. Conducting the same test today results in downloading over 1.2MB of JS 😳 That’s pretty eye-watering. Peeking into the Network tab, 785kb seems to be a single base JS file.

What’s up with the cache?

These tests were all conducted with a fresh, uncached page. There seems to be some decent caching going on, as Chrome reports only 75kB of JS transferred on a return visit, as well as when visiting a page with a different embed. On Firefox however, the same page with the same embed reports 2.9MB of JS transferred! What is going on?! Are dev tools inaccurate, or are different browsers downloading resources differently?

After a bit of Googling, I discovered that Firefox introduced a feature called RCWN (Race Cache With Network) some time ago. This led me to this fascinating article by Simon Hearne, When Network is Faster Than Cache. It turns out that sometimes retrieving a resource from the cache can take longer than fetching it from the network! In Firefox’s case, files are being requested from both the cache and the network, and the fastest one wins. On my home broadband connection, the network seems to beat the cache nearly every time, which (I assume) is why we’re seeing those files transferred each time. On slower connections this probably wouldn’t be the case.

It’s reassuring to know that users on poor connections would have those files served from the cache. But Simon’s article makes the point that cache retrieval can be slow, and becomes slower the more resources are requested from the cache, which particularly for those with low-powered devices and connections.

There is an assumption that cached assets are retrieved instantly and at zero cost. What we have discovered here is that there is in fact a cost to retrieving assets from cache based on the number of cached assets (not file size) and the user’s devices.

Additionally, I’m not sure that hitting the network every time (in Firefox’s case) is more sustainable?! Google’s explanatory article on cache strategies notes that it can be ideal for small assets. It also notes:

However, going to the network when the user has the content on their device can be a waste of data, so bear that in mind.

Hmm. Surprisingly enough (or not at all surprisingly), the best route to good performance and a more sustainable website is to keep your pages as lightweight as possible, and avoid your users having to download all that data in the first place. In that case, it’s all the more disappointing to see Google increase the amount of JS shipped with the YouTube embed, perhaps in the mistaken believe that the cache will save the day.

I’m not a performance expert, so I might be missing a crucial piece of the puzzle. I’d love to hear from folks who have some more insight into this!

If you’d like to test the performance of a few different types of social media embed (including YouTube videos), I’ve made a lightweight website to do just that.



Source link

Tags: cssembedsfront endMediaPerformanceSocialTestingweb designweb development
Previous Post

EdgeWise MEP’s Automated Modeling Algorithms Connect Pipes Across Occluded Regions

Next Post

Cryptocurrency Executives Anticipate Bullish Trends and Potential Bitcoin Surge in 2024 – Blockchain News, Opinion, TV and Jobs

Related Posts

The essential principles of a good homepage
Front-Tech

The essential principles of a good homepage

June 7, 2024
How to measure and improve user retention
Front-Tech

How to measure and improve user retention

June 6, 2024
Push Animation on Grid Items
Front-Tech

Push Animation on Grid Items

June 5, 2024
How to build a Rails API with rate limiting
Front-Tech

How to build a Rails API with rate limiting

June 4, 2024
Introduction to the B.I.A.S. framework
Front-Tech

Introduction to the B.I.A.S. framework

June 3, 2024
Blue Ridge Ruby is exactly what we need
Front-Tech

Blue Ridge Ruby is exactly what we need

June 3, 2024
Next Post
Cryptocurrency Executives Anticipate Bullish Trends and Potential Bitcoin Surge in 2024 – Blockchain News, Opinion, TV and Jobs

Cryptocurrency Executives Anticipate Bullish Trends and Potential Bitcoin Surge in 2024 – Blockchain News, Opinion, TV and Jobs

Agree Realty: 4.9% Yield, Monthly Payer, Great Preferreds (NYSE:ADC)

Agree Realty: 4.9% Yield, Monthly Payer, Great Preferreds (NYSE:ADC)

Best Programming Languages to Learn in 2023 | 2024

Best Programming Languages to Learn in 2023 | 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Trending
  • Comments
  • Latest
Amazon’s Bedrock and Titan Generative AI Services Enter General Availability

Amazon’s Bedrock and Titan Generative AI Services Enter General Availability

October 2, 2023
The 15 Best Python Courses Online in 2024 [Free + Paid]

The 15 Best Python Courses Online in 2024 [Free + Paid]

April 13, 2024
Digital Marketing Basics for Beginners | Fundamentals of Digital Marketing 2023 | Simplilearn

Digital Marketing Basics for Beginners | Fundamentals of Digital Marketing 2023 | Simplilearn

October 14, 2023
9 Best Open Source Text-to-Speech (TTS) Engines

9 Best Open Source Text-to-Speech (TTS) Engines

April 9, 2024
Does ExpressVPN Work in China in 2024? Expert Explains

Does ExpressVPN Work in China in 2024? Expert Explains

February 2, 2024
3 Must-Know Algorithms for Automating Chart Pattern Trading in Python

3 Must-Know Algorithms for Automating Chart Pattern Trading in Python

October 11, 2023
Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

June 10, 2024
AI Compared: Which Assistant Is the Best?

AI Compared: Which Assistant Is the Best?

June 10, 2024
How insurance companies can use synthetic data to fight bias

How insurance companies can use synthetic data to fight bias

June 10, 2024
5 SLA metrics you should be monitoring

5 SLA metrics you should be monitoring

June 10, 2024
From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

June 10, 2024
UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

June 10, 2024
Facebook Twitter LinkedIn Pinterest RSS
News PouroverAI

The latest news and updates about the AI Technology and Latest Tech Updates around the world... PouroverAI keeps you in the loop.

CATEGORIES

  • AI Technology
  • Automation
  • Blockchain
  • Business
  • Cloud & Programming
  • Data Science & ML
  • Digital Marketing
  • Front-Tech
  • Uncategorized

SITEMAP

  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2023 PouroverAI News.
PouroverAI News

No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing

Copyright © 2023 PouroverAI News.
PouroverAI News

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In