Are both "cache request directives" and "cache response directives" necessary?

If I already have "cache request directives", what is the essence of "cache response directives". Are they adding something? Will my application work without them?

I am looking for evidence of whether "cache response directives" are redundant. If they are redundant, I will not bother with them.

Gc _

+6
source share
2 answers

I assume that you are asking as an application developer, and if so, you should not worry about any Cache-Control header that your application receives in the request.

? Cache-Control , . .

RFC7234 5.2 ( ):

"Cache-Control" /.

- , . , . , , , .

: Cache-Control .

Cache-Control , . , , . , , , , , . Cache-Control, .

-?

, . Cache-Control , , , . .

RFC7234 4.2 :

"" , , .

:

?

. Cache-Control , , . , , Cache-Control: no-cache , .

, , , . . : , .

:

, , - . backend , 5 , Cache-Control: max-age=300 Expires.

, , 10 , 5 .

, 5 , Cache-Control: max-age=10, , 10 , 5- .

Cache-Control : , .

+3

" " " "?

. Cache-Control Cache-Control . Cache-Control , Cache-Control . . RFC7234:

, , .

, Cache-Control . - ? ? ? .. HTTP-, " " .

Cache-Control , , . , . RFC7234, " " indicates that the client is willing to... indicates that the client is unwilling to...

, (, Ajax), " " HTTP-. , HTML HTTP- ( , css ..), Cache-Control .

" ", " "?

" " Cache-Control, :

  • Cache-Control (, LM-Factor). .
  • (, , css ), Cache-Control , .
+2

All Articles