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:


The WordPress downloads counter has a json output here:

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: <>; 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.