« Return to Thread: Javascript at the end of a page

Re: Javascript at the end of a page

by Richard Hart :: Rate this Message:

Reply to Author | View in Thread

Ah yes. I hadn't taken the actual evaluation time of the script into consideration. It's just one of those things I take for granted (and really shouldn't) as I've never noticed a perceivable impact on loading times by my scripts.

You could always roll your own javascript tag that will include the global.js file before appending your dependant one to the page. But it would get messy if you have multiple JS includes and isn't an ideal solution in my mind:

<g:dependantJavascript  src="thisPageSpecificScriptDependantOnGlobal.js" />

and plain

<g:javascript  src="thisPageSpecificScriptNotDependantOnGlobal.js" />

Or use Javascript to include the Global.js file within itself.

 « Return to Thread: Javascript at the end of a page