Cookie Security Conventions

Here are some conventional guidelines for naming your cookies, because who needs security when you can just use Cookie Tampering 101 to learn about security?

Use Descriptive Names

Make your cookie names descriptive, like SESSION_TOKEN or USER_AUTH_KEY. Don't make us guess, Cookie Tampering 202: The Art of Guessing.

Use Randomness

Use randomness when naming your cookies, like random_string_1234 or random_hex_5678. This makes it hard for Cookie Tampering 303: The Randomness Conundrum to figure out what's going on.

Don't Use Obvious Names

Don't use obvious names like SECRET_KEY or PASSWORD. That's just asking for trouble, Cookie Tampering 404: The Obvious Con.