Loading...
 
Skip to main content

Tiki should use modern meta tag for charset

Status
Open
Subject
Tiki should use modern meta tag for charset
Version
27.x
Category
  • Less than 30-minutes fix
Feature
Meta Tag
Resolution status
New
Submitted by
Gary Cunningham-Lee
Lastmod by
Gary Cunningham-Lee
Rating
(0)
Description

I was doing a little testing with https://github.com/ffoodd/a11y.css. One of the errors it flags is <head> must start with charset . Tiki doesn't have that exact meta tag, like <meta charset="utf-8"> but it has <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> .

A search turned up this information:

Both and serve the same purpose of declaring the character encoding for the HTML document. However, is the preferred method in HTML5 because it is more concise and easier to read.

The http-equiv="Content-Type" version was used in older HTML specifications like HTML 4.01, while the charset attribute is the standard in HTML5. Although both are still supported by browsers for backward compatibility, the simpler is recommended for modern web development.


I checked a dozen or so tech and popular websites and found only one - drupal.org - using the http-equiv="Content-Type" version. Functionally, it apparently doesn't make a difference, but just to be up to date and use the modern syntax it seems like a good idea to update that (assuming there are no downsides to this change).

Importance
7
Easy to solve?
8
Priority
56
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8613
Created
Wednesday 27 March, 2024 03:50:28 UTC
by Gary Cunningham-Lee
LastModif
Wednesday 27 March, 2024 03:50:28 UTC


Show PHP error messages