To give users the best experience, follow these guidelines.

Offer guest features

local save example

Show signed in users their nickname so they know they are connected.

Show guests a login button and list the features they get for signing in.

Let users decide when to send data

When submitting scores or saving player data, wait until a player clicks a button to transmit data.

Use sparingly

Try to minimize requests to external services. Avoid unnecessary calls, check your browser’s network tab to detect API calls that repeat.

If your application makes requests every few seconds, it is too frequent. Worst cases, frequent API calls will experience throttling or failure.

Handle API Errors Gracefully

Keep in mind that API requests can fail due to multiple reasons. Players may have slow internet connections. Check that requests were successful. For example, if user_data/submit request has failed, the app should warn the player saving did not work, otherwise players may be disappointed to find data loss.

Https by Default

Encryption is now used site wide. Visit Let’s Encrypt for a free certificate. The certbot tool comes with predefined methods for several web servers.