[IMP] speedup page loading by loading CSS in || before scripts

bzr revid: ddm@openerp.com-20130925155434-mg3v6ur9wh4h3nvj
This commit is contained in:
ddm
2013-09-25 17:54:34 +02:00
parent 71bb1ca0ce
commit e7a469f8bc
2 changed files with 13 additions and 7 deletions
+9 -6
View File
@@ -21,6 +21,15 @@
<meta name="openerp.company" t-att-value="res_company.name" />
<meta name="description" value="" />
<meta name="keywords" value="" />
<!-- Load stylesheets before scripts to avoid blocking -->
<link rel='stylesheet' href='/web/static/lib/fontawesome/css/font-awesome.css'/>
<t t-if="editable">
<link rel='stylesheet' href='/website/static/src/css/snippets.css'/>
<link rel='stylesheet' href='/website/static/src/css/editor.css'/>
</t>
<t t-call="website.theme"/>
<script type="text/javascript" src="/web/static/lib/underscore/underscore.js"></script>
<script type="text/javascript" src="/web/static/lib/underscore.string/lib/underscore.string.js"></script>
<script type="text/javascript" src="/web/static/lib/jquery/jquery.js"></script>
@@ -32,9 +41,6 @@
<script type="text/javascript" src="/website/static/src/js/website.js"></script>
<t t-if="editable">
<link rel='stylesheet' href='/website/static/src/css/snippets.css'/>
<link rel='stylesheet' href='/website/static/src/css/editor.css'/>
<script type="text/javascript" src="/website/static/lib/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/website/static/lib/ckeditor.sharedspace/plugin.js"></script>
<script type="text/javascript" src="/website/static/lib/ace/ace.js"></script>
@@ -52,9 +58,6 @@
</t>
<t t-raw="head or ''"/>
<t t-call="website.theme"/>
<link rel='stylesheet' href='/web/static/lib/fontawesome/css/font-awesome.css'/>
</head>
<body>
<div id="wrapwrap">
+4 -1
View File
@@ -12,8 +12,11 @@
</template>
<template id="website.layout" inherit_id="website.layout" inherit_option_id="website.layout">
<xpath expr="//head" position="inside">
<!-- Load stylesheets before scripts to avoid blocking -->
<xpath expr="//head/link" position="after">
<link rel='stylesheet' href='/website_mail/static/src/css/website_mail.css'/>
</xpath>
<xpath expr="//head" position="inside">
<script type="text/javascript" src="/website_mail/static/src/js/website_mail.js"></script>
</xpath>
</template>