Opened 15 months ago
Last modified 12 months ago
#20226 new enhancement
Don't advertise pingback URL on resources that don't support pingbacks
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Template | Version: | 3.3 |
| Severity: | minor | Keywords: | nacin-likes |
| Cc: |
Description
Currently, WordPress indiscriminately adds an X-Pingback header to all responses. Similarly all the bundled themes add link rel="pingback" to all pages.
The purpose of X-Pingback and link rel="pingback" is to advertise that the current resource supports pingbacks and provide a pingback URL. They should only be inserted when the resource actually accepts pingbacks - i.e., only when is_single() is true, and maybe even only when pings are open on that post.
Change History (3)
comment:3
solarissmoke
— 12 months ago
The rel="pingback" bit looks relatively easy to implement.
The X-Pingback header is not however, because currently headers are sent way before WP has any idea what it is serving. I think this is a bigger issue because it means that things like Last-Modified headers are generic and don't actually reflect the last modified time of the content being served (which sort of defeats the purpose of having them).
I could go for a fresh look at this.
add_theme_support( 'automatic-pingback-link' ) could remove rel="pingback" from themes and put it into our hands.
From there, it's a matter of figuring out exactly when to issue the HTTP header and <head> element, and making it extensible.