Opened 20 years ago
Closed 15 years ago
#2335 closed enhancement (maybelater)
Last-Modified/ETag for individual posts
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 2.0 |
| Component: | Optimization | Keywords: | dev-feedback |
| Focuses: | Cc: |
Description
When requesting a feed, the Last-Modified and ETag headers are sent to allow clients to do the right thing. Why not also send these headers when an individual post is requested, and use the date of when the post was last modified? This should lighten the server load, and improve upon the idea behind the Last-Modified/ETag headers.
Change History (7)
#2
@
20 years ago
I did consider that, but thought that perhaps the body of the page, the actual post, would be of more importance than periphery information in a sidebar. Is a site considered updated with new content, and does it ping update services when a sidebar changes? Many sidebars are dynamic and change with every page load...
#4
@
16 years ago
- Cc dvanliere@… added
- Keywords dev-feedback added
- Resolution invalid deleted
- Status changed from closed to reopened
- Version 2.0 deleted
Hi,
I would like to reopen the discussion on this topic. I think Wordpress has come a long way in 5 years and adding Last-Modified / Etag headers could help improve the performance of many servers and reduce bandwidth usage. The current send_headers (in classes.php) function has already quite extensive conditionals to determine whether content has (not) changed and it would be fairly easy to extend this to individual web pages as well.
There are different solutions to address the concern that a plugin might break the Last-Modified date:
1) Make add etag / last modified header configurable, enable it by default, but if it breaks a particular plugin then you can turn it off.
2) Loop over all installed plugins and include them in the conditionals to see whether content has changed
3) Accept that in some cases the last-modified date is incorrect (obviously not ideal but still a possible solution).
I hope we can discuss this issue in more detail!
Best,
Diederik
This is not done because there might be dynamic content in the sidebar (say), which might have changed since the post. Last-Modifieds would break these.