Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
614 views
in Themes by
I'd like to have the CSS and js load from the bottom of the page. Is this possible with the snow and elegant responsive theme?

 

Thanks

2 Answers

+1 vote
by
It's potentially possible but not recommended as it may break some things.

In your theme you would need to move the calls to head_css() and head_script() out of the head() function and to the bottom of the body() function (before </body>).

I would never recommend putting CSs at the bottom as it makes a page slower to load. For JavaScript, some plugins will rely on jQuery and could output their scripts anywhere on the page before jQuery is loaded.
0 votes
by
edited by
You can do it by modifying theme.php.

In general, since rendering of browser was protected while loading javascript, page speed will be improved by loading javascript at the end of the page. By this changes, human experience speed improves, but display performance of the entire page does not change. Plugins that jQuery script has been written in the body will not move. However, in my verification, such plugins were a little.

HTML code example (It is not Snow. It's FA2):
view-source:http://askive.cmsbox.jp/demo/flexarmor2

Performance data (HTML compression and minify included):
http://askive.cmsbox.jp/demo/flexarmor2/document-22-performance

Plugin compatibility of FA2:
http://askive.cmsbox.jp/demo/flexarmor2/document-25-compatibility

In my performance evaluation, you will get better performance by reducing number of scripts more than changing location of the script. Anyway, there are advantages and disadvantages. I recommend that you judge by understanding these information.

I like very much MVC process model of Q2A.
...