-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unnecessary extra headers send #626
Comments
Are you talking about this section of code specifically? https://github.com/flightphp/core/blob/master/flight/net/Response.php#L434-L438 I guess it'd be helpful to understand why those headers should just not be sent at all? I seem to recall needing to add them because otherwise API calls were mysteriously caching when they shouldn't have been even though different data sets were being sent. |
Also at this point you should just become an honorary member of flightphp with all the Issues and PR's you're helping with hahaha |
I found the original commit/PR, and yeah that's the reason why I had to add those. |
Absolute none framework add that headers. But remember no headers at all !! Test it in local. PD: if you add only 1 of these headers, then start the problem. And please don't add the |
All that headers added to the response, are terrible for any benchmark !! |
I can be an honorary member, but it's better if the people follow me, or help like sponsor. |
I did what you suggested and it looks like it's working as expected. My guess is that previously some header was added for caching elsewhere and it's since been fixed. I'll take the performance win! Thanks! |
Actually always add
Cache-control
andExpires
headers.If there is no
Cache-Control
header and noExpires
header, and noLast-Modified
header (which most web servers send by default for static assets) is never cached by the browser.And
Cache-Control
(http 1.1) have preference overExpires
(http 1.0)https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires
Any app using an API with Flight, also don't need these headers.
The text was updated successfully, but these errors were encountered: