Reputation: 48091
I believe they are both equivalent but to be sure I would like to know others.
Which version is correct?
Cache-Control: public, max-age=60
Cache-Control: max-age=60, public
?
Upvotes: 9
Views: 7442
Reputation: 4771
Here's the grammar for the Cache-Control directive from RFC 7234:
Cache-Control = 1#cache-directive
cache-directive = token [ "=" ( token / quoted-string ) ]
1#cache-directive
means that you need at least one cache-directive
. Since public
and max-age
are both Cache-Control directives, the order doesn't matter.
Upvotes: 20
Reputation: 39879
They are equivalent. Order doesn't even make a different in that scenario anyway.
Upvotes: 1