I've currently switched from WordPress to Yii framework and an external developer is rebuilding my site.One thing I notice is that each time he invokes AJAX / jQuery the Yii way, it embeds inserts JavaScript inline in the web page. Although it seems the JavaScript code is placed below the footer, it's still inline.In general, it seems that JavaScript code is more frequently being put inside the webpage. I've always been thought that JavaScript scripts should, as much as possible, be placed in JavaScript files. Is this a coming new trend? Or should I still try to keep JavaScript code in separate files?
Is inline JavaScript good or bad?
html;javascript
Inline JavaScript increases download times for the page, which is not good. With a call to a .js file, at least these can be parallel calls and content download times decreased. Yes there are times where it is okay to put JavaScript directly in the HTML code, but you are often better off off-loading this as much as possible.Keep in mind that page download times (that is, the HTML) and not all the resource calls affect the metrics that affect ranking (albeit as PageRank or in the SERPs it does not matter). The point is, it affects a sites performance for SEO however it manifests.