2 ms·
> All on the same line, with commas and semicolons being the only separators, no line-breaks, tabs or anything allowed. That's the format for HTTP headers. The
by marcosdumay 8y ago
> All on the same line, with commas and semicolons being the only separators, no line-breaks, tabs or anything allowed.
That's the format for HTTP headers. They could push against the standard and accept spaces, but anything else would break your browser.
- throwaway77384 8y agoThat's fair enough, and admittedly I wasn't aware of this. Presumably that format was fine before bigger / more complex CSP rules came along? I find it very difficult to work with visually. Hard to see where one thing stops and another starts.
- marcosdumay 8y agoThe format was clearly not created for large things like CSP rules. If it was up to me, I would have placed the information at the linking tags inside the HTML (and JS, and CSS), or even extended the HTTP URI format in some way. There is probably a very good reason why people decided for the header, but I'm not aware of it.