WordPress.org

Making WordPress.org

#5315 closed defect (fixed)

Fix MIME type and other headers for counter JSON output

Reported by: joostdevalk Owned by: dd32
Milestone: Priority: normal
Component: General Keywords:
Cc:

Description

The WordPress downloads counter has a json output here:

https://wordpress.org/download/counter/?json=1

The MIME type on that is text/html and because of that Google is throwing warnings for it. I'd suggest:

  • Setting the MIME type to application/json
  • Adding a canonical link header like this:
Link: <https://wordpress.org/download/counter/>; rel="canonical"

Change History (1)

#1 @dd32
17 months ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 10060:

Main: Add Canonical and proper Content-Type headers to the download counter ajax endpoints.

Props joostdevalk.
Fixes #5315.

Note: See TracTickets for help on using tickets.