Why Twitter Has Avoided An Edit Button For So Long

Why Twitter Has Avoided An Edit Button For So Long

Twitter users have wanted the ability to edit tweets for a very long time. And it makes sense! We all make typos, so we should be able to correct them!

Some people argue against it, however, saying it could lead to abuse. Users could change the content of a tweet after it's been widely shared, making it seem like many people agree with the new content, when they only saw the original content. Misinformation is already a big issue on the internet, and this wouldn't help.

Some have proposed adding a time limit - that you can only edit a tweet within 5 minutes, or 2 minutes, or even 30 seconds of posting it. Or, that you can only change a certain number of characters (letters, numbers, symbols, etc.). That would certainly help! But even with all these ideas, Twitter still hasn't added an Edit button!

It may not seem like it at first, but an Edit button would likely require many technical changes in Twitter's systems. How so? Two words: Caching and Algorithms.


What is Caching?

Caching (pronounced "cash-ing") is a clever technology websites use to make their websites load faster while also reducing their operating costs. Seems impossible, right?

A cache (pronounced "cash") is a service that stores data that is accessed very frequently to reduce load times. It could take 100ms (milliseconds) to load a piece of data from its original source (such as a database), while it only takes 2ms to retrieve it from a cache.

The first time a request hits a cache, the cache still asks the database for the data. However, the cache will save that data locally for easy access. Any subsequent request for this data can be served directly from the cache, bypassing the database entirely!

The first section shows two requests with no cache taking 100ms. The second section shows two requests with a cache; the first takes 100ms (and saves the data to the cache), the second only takes 2ms since the data came from the cache!
A diagram that demonstrates how caches can greatly reduce request response times

And not only does it reduce load times, but it reduces server strain as well! Reading from a database takes longer than reading from a cache, because reading from a database is a more CPU-intensive task. Having less load or strain on your database (or cluster of databases) means you can lower your spend on database servers. Less servers = less money spent!

There are other benefits to caches as well! If you're in Germany visiting a website hosted in California, it will take a (relatively) long time to load. But, if I had a cache of my website in Europe, it'd be much faster! Now, a user in Germany wouldn't have to load data from 5,500+ miles away.

Most websites use a third-party CDN provider like Cloudflare or Akamai to cache their content all around the world. Cloudflare, for example, has over 250 Points of Presence (POPs) that many websites - including the one you're on right now! - use to speed up the user experience.

A map of the world with 250 dots on it, each representing a Cloudflare POP. Wow!
That's a lot of POPs!

How does caching affect the Twitter app?

Caches don't just have to exist on servers hosted in "the cloud" - apps on your phone can have built-in caches as well! The most common example of this is a web browser.

If you visit www.google.com and load the Google logo, your browser will cache it for up to a year! Until that cache expires, your browser will use the local copy rather than requesting a new one.

Statistics from a request to load Google's homepage logo, showing a cache "max-age" value of 31536000 seconds, or 1 year!
The Google logo has a cache "max-age" of 31536000 seconds, or 1 year!

This local caching reduces load times for you since the data is already stored on your device! And, if you're loading content locally, the server operator doesn't need to spend time or money getting it to you. Less bandwidth usage = lower costs.

Like a web browser, Twitter has a built-in cache that stores just about everything you see in the app. Tweet content, like counts, retweet counts, author names, profile pictures, etc. Your timeline stores hundreds of tweets at a time to reduce how often the app requests more data from Twitter.

You can test this yourself!

Close Twitter, turn on Airplane Mode, and launch Twitter again. Everything you see is saved on your device! It couldn't have been retrieved from a server since you're on Airplane Mode!


How does caching in the Twitter app affect an Edit button?

If a tweet is cached on your device, and the original author edits it and changes the content, we have a problem! Your app already has a copy of the tweet cached locally. You'll still see that old copy until (1) the local cache expires, or (2) the app checks with Twitter's servers to see if the tweet was edited.

(1) is fine since that's how caches are meant to work. (2) on the other hand isn't! The whole point of a local cache is that you don't need to constantly check with Twitter to see if the content changed!

It's certainly possible for Twitter to add ways to check whether the locally cached content is still "fresh", or if it needs to be updated. They already do a similar check to see if a tweet was deleted.

A tweet with the text "I'm going to delete this tweet!" was deleted, but was still viewable on the device since it was stored in the local cache.
A tweet that's been deleted could still be cached on your phone!

However, going a bit deeper into application design... That "deleted check" happens in the same request Twitter makes to get the replies to the tweet. Notice how "This Tweet has been deleted" only shows up after the loading icon for replies briefly appears? If that GetReplies request returns a failed response, Twitter can assume the tweet was deleted.

With an edited tweet, though, you wouldn't be able to load edited content based on whether there are replies are not. They could be combined into one request - GetRepliesAndEditHistory - but that still means the tweet's Edit History would need to be loaded into the response, which increases server load and expenses. As they say, "there's no such thing as a free lunch."


Algorithms - It's more than just local caching!

If the only change an Edit button required was a small but noticeable increase in requests to Twitter's servers, then maybe the change could be justified. After all, users have been petitioning for it for years!

Unfortunately, there's a lot more to do than just clear caches and process more requests. That's because a lot happens when you post a tweet! Here's a quick summary of the things I can think of (having never worked at Twitter):

  • Add the tweet to Twitter's central database.
  • Send notifications to any users that subscribe to notifications for the tweet's author.
  • Scan tweet for harmful or spam content, and mark it for human review if needed.
  • Analyze the tweet and determine if it should be added to any users' algorithmically generated Home Timelines.
  • Determine if the tweet fits into any active algorithmically generated Trending Topics, or if a new topic should be created.
  • Publish the tweet to any Lists the author is included in.
  • Determine if the content of the tweet should put the author in any Advertising Audiences (you can see what "interests" Twitter assigns to you and how many audiences you're in here - I'm in 647!).
Text from the Twitter app that says "You are currently a part of 647 audiences from 233 advertisers" - wow!
I could guess maybe 20 audiences I'd be grouped into, but not 647.

Like I said, there's a lot that goes into posting a tweet - and that's just the stuff I could think of. Add in the layers of caching necessary for all of those algorithms and analysis processes to run, and you can see how complicated it really is!

Now consider how editing a tweet would impact all of those processes:

  • Add the edited version of the tweet to Twitter's central database as an "update" to the existing tweet. Keep the tweet's history for moderation purposes, and potentially for public view if Twitter so chooses.
  • Send a notification to notification subscribers that the author edited a tweet (if Twitter decides to do this).
  • Re-scan the edited version of the tweet for harmful content or spam, and mark it for human review if needed.
  • If the original content was considered harmful, but the edited version is not, should the user still be punished? Was the original content malicious or just a typo?
  • Update the dashboard Twitter staff use to review tweets to support viewing a tweet's edit history.
  • Re-analyze the tweet and determine if the tweet still belongs on any Home Timelines it was added to, or if it should be added to new ones.
  • Determine if the tweet still fits into any Trending Topics it was added to, or if it should be added to new ones.
  • Determine if the new tweet content places the author in any different Advertising Audiences, or if they should be removed from any they were put into as a result of the original tweet's content.

That's a lot of work that would need to happen to support an Edit button, and there's certainly more to it than that.


Why would Twitter want to do all of that?

Return on Investment, or ROI, is an economic concept that represents how much money you make as a result of spending an original sum of money. For example, if it takes $5,000,000 to add a "Buy It Now" button on Amazon's e-commerce site, but they make $15,000,000 as a result of the change, their ROI was $10,000,000. Pretty good!

Social media sites like Twitter, however, don't operate on that same business model. Twitter makes (just about) all of its money from showing ads to users. Any expensive change to the platform should result in users seeing more ads, or there's no valid business justification for it.

A different approach is usually followed on social media sites, though. Rather than directly increasing the number of ads users see, they focus on making the site more "worth your time." Even if they show the same number of ads per hour, if you spend more hours on the site, they make more money!

How much money is an Edit button worth?

So, with that said, how much money would an Edit button make Twitter? Directly, nothing - unless they put it behind a paywall, which leads to a whole host of other complications and controversy we won't get into here.

They probably won't make much more by users spending more time on the app, either. Twitter Spaces, Instagram Reels, YouTube Shorts - those are all attempts by these companies to expand on what their apps offer, making you want to spend more time on them. An Edit button on Twitter won't impact that much, if at all.

And as we saw in the previous section, the number of changes that an Edit button would require is significant. I wouldn't know how much those changes would cost Twitter, but it's safe to assume it will be much more than they would end up making back. In short, the ROI of an Edit button is small, zero, or even negative, which makes it a poor business choice!


So what happens, then?

As we've seen, Edit buttons aren't impossible. Facebook posts, Instagram posts, YouTube descriptions and comments, Reddit threads, etc. can all be edited. But when a system like Twitter's is designed from the beginning without it, and people are trained that what they see is exactly what the author wrote on that date, adding an Edit button introduces more complexity, to say the least.

I don't work at Twitter, I don't know how their systems are architected, and therefore I don't know how expensive the change to add an Edit button would be. But, there's no doubt that it would require a lot of re-architecting work. And, with an expensive change like this, if there's no equally significant ROI, then why even do it in the first place? #JustPorofreadYourTweets!


If you enjoyed this exploration into how an Edit button would change Twitter, you can always follow me on... well, Twitter 🤣

Also, for the record, I have no significant opinion for or against an edit button. I use Twitter a lot, but I rarely tweet. I'm just fascinated by how a simple feature could result in such significant changes, so I wrote a blog post about it!

Show Comments