Menu

Instagram uploads your photo before you tap Share. Here's how to build that properly
📰

Instagram uploads your photo before you tap Share. Here's how to build that properly

DEV Community: ios·Mohamed Elgohary·about 12 hours ago
#8HwhvvBb
#devtoios#devto#dev#upload#server
Reading 0:00
15s threshold

Open Instagram, pick a photo, write a caption, tap Share . The post shows up almost instantly, even on a weak connection.

The app isn't uploading faster than anyone else. It started uploading before you tapped Share.

Instagram's co-founder Mike Krieger described this in a 2011 talk, Secrets to Lightning Fast Mobile Design , under a principle he called "move bits when no one is watching". As soon as you pick the photo and move on to the caption screen, the upload starts in the background. By the time you finish typing, the bytes are on the server. Share only has to send a tiny request: "create a post with this upload and this caption". If you back out, the client cancels and the server deletes the data.

The idea fits in one sentence. Building it so it is reliable, cheap and respectful of the user's data takes more care.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.