Make WordPress Core

Opened 21 years ago

Closed 20 years ago

#16 closed enhancement (fixed)

WP should use HTTP headers instead of the META element

Reported by: anne's profile Anne Owned by: matt's profile 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)

#2 @matt
21 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.

#3 @Anne
21 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?

#4 @anonymousbugger
20 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.

#5 @Anne
20 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.

#6 @2fargon
20 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

#7 @anonymousbugger
20 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.

#8 @anonymousbugger
20 years ago

Replaced or removed?

#9 @Anne
20 years ago

Removed if they have equivalent HTTP headers.

#10 @matt
20 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.