Menu

Why we keep every game page under 100KB of our own code
📰

Why we keep every game page under 100KB of our own code

DEV Community: html·Daniel Mercer·4 days ago
#XEI29bY2
#devto2#devto#dev#every#game
Reading 0:00
15s threshold

Why we keep every game page under 100KB of our own code

A game portal with 56,000 pages has a performance problem that most sites never face. Every page must load fast, on hardware we do not control, over connections we cannot predict. Our answer is a rule that sounds almost too simple: our own code on every game page must stay under 100KB, measured before compression, and it must stay there no matter how many features anyone proposes.

The rule exists because of what our players actually use. A large share of our traffic arrives on low-end Android phones, shared family tablets, and school or library computers that are several years old. On those devices, a heavy page is not a minor annoyance. It is the difference between playing a game and closing the tab. A page that takes eight seconds to become usable has already lost the player, even if the game itself is excellent.

Keeping our code small forces a particular kind of discipline. Every script must justify itself.…

Continue reading — create a free account

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