Needlworks / Textcube

Textcube : Brand yourself! / Personalized web publishing platform with multi-user support
http://www.textcube.org
Other
207 stars 55 forks source link

rearrange order between css and js #1660

Closed outsideris closed 10 years ago

outsideris commented 10 years ago

system.css is below js files(such like EAF4.js, common2.js) so it cause down browser redering performance. refer https://developers.google.com/speed/docs/best-practices/rtt#PutStylesBeforeScripts

before:

system.css is under javascript files.

<link type="text/css" rel="stylesheet" href="/plugins/CodeHighlighter/styles/shThemeRDark.css" />
<script type="text/javascript" src="/resources/script/jquery/jquery-1.6.4.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="/resources/script/EAF4.js"></script>
<script type="text/javascript" src="/resources/script/common2.js"></script>
<script type="text/javascript" src="/resources/script/gallery.js" ></script>
<script type="text/javascript" src="/resources/script/flash.js" ></script>
<link rel="canonical" href=""/>
<link rel="stylesheet" href="/resources/style/system.css" type="text/css" media="screen" />

after:

system.css move to top of javascrript files

<link type="text/css" rel="stylesheet" href="/plugins/CodeHighlighter/styles/shThemeRDark.css" />
<link rel="stylesheet" href="/resources/style/system.css" type="text/css" media="screen" />
<link rel="canonical" href=""/>
<script type="text/javascript" src="/resources/script/jquery/jquery-1.6.4.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="/resources/script/EAF4.js"></script>
<script type="text/javascript" src="/resources/script/common2.js"></script>
<script type="text/javascript" src="/resources/script/gallery.js" ></script>
<script type="text/javascript" src="/resources/script/flash.js" ></script>