Making WordPress.org

Opened 4 years ago

Closed 4 years ago

#5315 closed defect (bug) (fixed)

Fix MIME type and other headers for counter JSON output

Reported by: joostdevalk's profile joostdevalk Owned by: dd32's profile 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
4 years 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.