Quantcast
Channel: Coding standards
Viewing all articles
Browse latest Browse all 22

Create cookie naming standards

$
0
0

There are a handful of modules that set extra cookies to accomplish various things outside of the session. Some of them are used only on the client side and the server never needs to see them. Some of them are actually used on the server side. See:
https://wiki.fourkitchens.com/display/PF/Modules+that+break+caching,+and...

If you are running something like Varnish you can't tell which need to be seen by the server and which don't. We generally strip all client side only cookies to increase odds of cacheing. What I'm proposing is that we define a set cookie name prefix for client side only cookies, and possibly one for regular cookies. If contrib authors tried to stick to the prefixes then it would mean a lot less customization of the defacto Varnish VCL that everyone uses. For example, the defacto VCL alreasy uses the regex "__[a-z]+" for Google Analytics.

It could be as simple as stating that all client side only cookies should have a prefix of "__". Thoughts?


Viewing all articles
Browse latest Browse all 22

Trending Articles