|
|||
|
Hello everyone,
Within an action I send an image to the client. Since the image is not going to change, I would like to set the "Expires" header to a far future date, so that it gets cached by the browser. I set the replace flag to true, as stated in the documentation. $response = $this->getResponse(); $response->setHeader("Content-Type", "image/jpeg"); $response->setHeader("Expires", "Thu, 15 Apr 2010 20:00:00 GMT", true); $response->setBody($image); $response->sendResponse(); When I take a look at the actual response headers, I see: "Expires: Thu, 19 Nov 1981 08:52:00 GMT, Thu, 15 Apr 2010 20:00:00 GMT" Here my questions: (1) Why is the replace header not working? (I experiment the same problem when I try to set the "Cache" header). (2) Where does the "Thu, 19 Nov 1981 08:52:00 GMT" came from? I never set that one! I will greatly appreciate any help. Thanks. Best regards, Ivan. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|