WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#16 closed enhancement (fixed)

WP should use HTTP headers instead of the META element

Reported by: Anne Owned by: matt
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

WP currently uses the META element everywhere, but since HTTP is authorative it should actually use that. Something like:

'header("content-type:$mime;charset=$charset");'

This should be a global change; a lot of WP files are probably going to be affected by this change.

Change History (10)

comment:2 matt10 years ago

When we send headers with different content types currently it breaks some installations with 406 errors, for example on the RSS feeds. Until we find the root of that problem and determine how widespread it may be I'm not comfortable with making this change app-wide.

comment:3 Anne10 years ago

Ok. I think it can be done for the admin though. Pages like install.php and upgrade.php still use iso-8859-1 by default, where utf-8 might be more appropriate, since that is the default value for WP installs now, right?

comment:4 anonymousbugger10 years ago

It should do both in my opinion. Header information is lost when the page is saved on someone's disk (or in Google's cache). Meta information isn't because they are actually part of the document itself. Doing both will not harm you otherwise.

comment:5 Anne10 years ago

That isn't the advantage of HTTP-EQUIV and it never was. When a file is saved character information can be added by using BOM.

comment:6 2fargon9 years ago

  • Patch set to No
  • Status changed from new to assigned

WP already uses http headers and such. Are you suggesting that META should be done away with entirely? Can you provide a list of META elements that should be removed, and the replacements?
Or, if Matt's reply satisfies you, can you please close this bug?
Thank you.

edited on: 12-08-04 19:12

comment:7 anonymousbugger9 years ago

I filed this issue long ago and Matt's answer wasn't correct at the moment. Basically every META element that has en HTTP-EQUIV attribute should be replaced, on both the admin and end user side.

comment:8 anonymousbugger9 years ago

Replaced or removed?

comment:9 Anne9 years ago

Removed if they have equivalent HTTP headers.

comment:10 matt9 years ago

  • fixed_in_version set to 1.5
  • Owner changed from anonymous to matt
  • Resolution changed from 10 to 20
  • Status changed from assigned to closed

We do this now.

Note: See TracTickets for help on using tickets.