With javascript it is usually best practice to avoid inserting external script tags inside the head from a performance perspective.  However for jQuery Mobile moving the jQuery and jQuery Mobile scripts to the end of the HTML file may lead to your webapp being shown as plain HTML without CSS for some milliseconds until the framework is downloaded and executed (even if the CSS file is put in the head). This is because of the progressive enhancement approach that jQuery Mobile uses inside the framework. The CSS file does not do anything on the rendering without the JavaScript. Therefore, it is better to have them both in the head, even if there is a small performance delay.


We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published.