Permalink
Browse files

Move important head elements to top of the block

The `<meta charset>` tag is expected to be in the first 1024 bytes of an HTML file, so it's common to keep it as the very first item under the `<head>` tag. (See <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta>)

Also moving up other important meta tags which may affect rendering of the page as a whole.
  • Loading branch information...
behnam committed Nov 14, 2017
1 parent 86e7ef9 commit 6c92ccb57b04fac0066819dba960bef1f53aeafa
Showing with 10 additions and 10 deletions.
  1. +10 −10 templates/base.html
View
@@ -7,6 +7,16 @@
<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% if page in hidden_pages %}
<meta name="robots" content="noindex, nofollow" />
{% else %}
<meta name="robots" content="{{ ROBOTS }}" />
{% endif %}
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic' rel='stylesheet' type='text/css'>
{% if USE_LESS %}
@@ -40,16 +50,6 @@
{% include "partial/ga.html" %}
{% endif %}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% if page in hidden_pages %}
<meta name="robots" content="noindex, nofollow" />
{% else %}
<meta name="robots" content="{{ ROBOTS }}" />
{% endif %}
{% if BROWSER_COLOR %}
<!-- Chrome, Firefox OS and Opera -->
<meta name="theme-color" content="{{ BROWSER_COLOR }}">

0 comments on commit 6c92ccb

Please sign in to comment.