Vinzenz Mai: GET, POST und Caching: Kanns mir jemand erklären?

Beitrag lesen

Hallo Oliver,

ein paar Zitate aus RFC2616:

  • Sende ich zum zweiten Mal eine GET-Anfrage an exakt dieselbe URL, wird (logischerweise) beim zweiten Mal die Seite ausm Cache gezeigt und es findet kein Roundtrip zum Sever statt.

The response to a GET request is cacheable if and only if it meets
   the requirements for HTTP caching described in section 13.

  • Sende ich aber hintereinander zwei POST-Requests mit gleichen Parameter an exakt dieselbe URL, findet jedes Mal ein Roundtrip zum Server statt, der mir eine neue Seite generiert.

Responses to this method are not cacheable, unless the response
   includes appropriate Cache-Control or Expires header fields. However,
   the 303 (See Other) response can be used to direct the user agent to
   retrieve a cacheable resource.

Vielleicht hilft Dir das ja weiter ...

Freundliche Grüße

Vinzenz