stale-while-revalidate and stale-if-error implementation

Dewangga Bachrul Alam dewanggaba at xtremenitro.org
Sun Mar 5 11:29:57 UTC 2017


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hello!

I tried to use "stale-if-error=864000" and
"stale-while-revalidate=864000" co-exist with "expires max;"
directive. Is it possible? My configurations looks like :

... snip ...
expires max;
add_header Cache-Control "stale-while-revalidate=864000,
stale-if-error=864000";
... snip ...

And header response return :

cache-control:max-age=315360000
cache-control:stale-while-revalidate=864000, stale-if-error=864000

Is it ok and acceptable in major modern browser?

Or, should I changes the header to :

add_header Cache-Control "max-age=315360000,
stale-while-revalidate=864000, stale-if-error=864000";

Any feedbacks and helps would be appreciated.
Thanks in advance.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQI4BAEBCAAiBQJYu/avGxxkZXdhbmdnYWJhQHh0cmVtZW5pdHJvLm9yZwAKCRDl
f9IgoCjNcDy+D/0Vt2QvGF9RES6ZbWsyMdKiaQOWo11uU73ZDjqJNCTFbrlA6DgF
XYBdqugrcrLn6zlMP95KRmRgyNHHDsrbnVya5Sj0PhNno61k7i56nZZpt2AQ7fii
HaZ12PFIWB7RCa+Wbx4efj8PN5orhXVhg6R/bnOu5aN1ht0MLlcO0Y2mywQnSTZ1
kUsRWQZQRvH5gel/DewVYitvZ+a+FePLN2O/BgO6FoW0HNRmtySfTgKtHGARn+Zn
itPXSsM6gNYteNWFeWWC+2NrCTMBcPtlP9IzSS43Htmnmlkih7nEpSwSPNGAiTsf
3d3h6yl27URmbP1P33P7ef8ohKdoa3CXBlvETLCMEct+LApuAlY8bqhpGoeI4tHX
HfPo5g+cdI7l60bUQeQNQKTCe4NnfVXfKzp29Lj2WsHYlLfaaG46mbccUma4g665
dNk4ETWnk9ea3XPuFEx6x66j8JNW/+PBOJPvONZoiIWGp0fNmOiBhjMqIEEYGkI+
mFmqTQwmm2U7iRCM0umWvhnnqaSidjCviRYq/oeEH4sVULinM3SbUL5JSosa9+T2
xaAtqibqzCI9wnHQM7QFRdxY+E+h8EI3d8NFZrrfB9c0Y5CQMLX4GCCLQe6fHYCn
AAqWshuqWo1FckQO83cbQwRDOolPF8TOi6WYzrNzJjKIKGz5mbbhivTnkw==
=9/H5
-----END PGP SIGNATURE-----


More information about the nginx mailing list