Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Putting the head in order
Browse files Browse the repository at this point in the history
- Moving a few meta tags+base tag before title. I've noticed Bootstrap [recommends this](http://getbootstrap.com/getting-started/#template) (wasn't sure why) so I did some quick googling and [IE seems to be the reason](http://blogs.msdn.com/b/ieinternals/archive/2011/07/18/optimal-html-head-ordering-to-avoid-parser-restarts-redownloads-and-improve-performance.aspx) but there some other speculations too. Feel free to search more.

- ...in any case, [charset tag should come before the title](http://www.w3.org/wiki/The_HTML_head_element#Stop_right_there.21_Inline_CSS_and_JavaScript_is_not_too_clever.21).

- Removing keyword tag since it [isn't really used anymore](https://chrisedwards.me/seo/keyword-meta-tag-google/).

- Removing duplicate Content-type/Encoding tag

- Remove IE shim
  • Loading branch information
simison committed Jul 24, 2015
1 parent 0a7a715 commit 2802729
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions modules/core/server/views/layout.server.view.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
<!DOCTYPE html>
<html lang="en">

<head>
<title>{{title}}</title>

<!-- General META -->
<meta charset="utf-8">
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="fragment" content="!">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<base href="/">
<title>{{title}}</title>
<meta name="description" content="{{description}}">
<meta name="fragment" content="!">

<!-- Responsive META -->
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<!-- Apple META -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

<!-- Semantic META -->
<meta name="keywords" content="{{keywords}}">
<meta name="description" content="{{description}}">

<!-- Facebook META -->
<meta property="fb:app_id" content="{{facebookAppId}}">
<meta property="og:site_name" content="{{title}}">
Expand All @@ -38,13 +31,8 @@
<!-- Fav Icon -->
<link href="/modules/core/img/brand/favicon.ico" rel="shortcut icon" type="image/x-icon">

<!--Application CSS Files-->
<!-- Application CSS Files -->
{% for cssFile in cssFiles %}<link rel="stylesheet" href="{{cssFile}}">{% endfor %}

<!-- HTML5 Shim -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>

<body class="ng-cloak">
Expand All @@ -59,12 +47,12 @@
<script type="text/javascript">
var user = {{ user | json | safe }};
</script>

<!--Load The Socket.io File-->
<script type="text/javascript" src="/socket.io/socket.io.js"></script>

<!--Application JavaScript Files-->
{% for jsFile in jsFiles %}<script type="text/javascript" src="{{jsFile}}"></script>{% endfor %}
{% for jsFile in jsFiles %}<script type="text/javascript" src="{{jsFile}}"></script>{% endfor %}

{% if process.env.NODE_ENV === 'development' %}
<!--Livereload script rendered -->
Expand Down

0 comments on commit 2802729

Please sign in to comment.