This viral YouTube video's title updates itself to reflect the view count

It really works, too.
 By 
Sam Haysom
 on 
This viral YouTube video's title updates itself to reflect the view count
Watch Next

If you make a YouTube video that gets more than 2.5 million views in its first 17 hours, you're probably going to want to shout about it from the rooftops.

But what if the clip itself can do the shouting for you?

YouTuber Tom Scott's latest video does exactly that. The title, "This video Has X Views," continually updates itself to reflect its own view count.

"When I want my code to change a video title, I don't ask it to open up a web browser," explains Scott in the clip. "Instead, it sends a single request to YouTube: Here's the video ID; here's the stuff to change; here's my credentials to prove that I'm allowed to do that. Bundle that all up, send it over. And YouTube sends back a single answer — hopefully it's a response code of 200, which means OK, with confirmation of what the video's data has changed to."

After explaining how he programmed his video title to update, Scott goes on to explain why — and what follows is a fascinating history lesson of how coding has changed over the years, why it's changed, and what that might mean for the future.

Topics YouTube

Mashable Image
Sam Haysom

Sam Haysom is the Deputy UK Editor for Mashable. He covers entertainment and online culture, and writes horror fiction in his spare time.


Latest Videos

Stephen Colbert reacts to the Artemis II moon mission
A man in a suit stands on a talk show stage, gesturing.


'The Daily Show' reacts to judge halting Trump's White House ballroom
Desi Lydic presents "The Daily Show" beside an image of Donald Trump.


A24's 'Mother Mary' trailer is worth it for the FKA twigs track
Anne Hathway is dressed in a red pop star outfit with religious overtones in a film still from "Mother Mary."

Jon Stewart has a brutal reaction to Trump waffling about pens
A man in a suit sitting behind a talk show desk looks angry. In the top left is an image of the president holding up a pen.

Stephen Colbert gleefully recaps the best signs at the 'No Kings' protest
A man in a suit stands on a talk show stage, smiling. The caption at the bottom reads, "I like that one."

Riz Ahmed is troublingly intense in new 'SNL UK' promo
A close-up of a man grinning in a slightly creepy way.


The biggest stories of the day delivered to your inbox.
These newsletters may contain advertising, deals, or affiliate links. By clicking Subscribe, you confirm you are 16+ and agree to our Terms of Use and Privacy Policy.
Thanks for signing up. See you at your inbox!