myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jörn Zaefferer" <>
Subject Re: how to use a javascript source in a component
Date Wed, 07 Mar 2007 21:14:25 GMT
On 3/7/07, Simon Kitching <> wrote:

> Some browsers allow them in
> the BODY but that is not actually valid html.

That isn't true either. The spec says:
"The SCRIPT <>element
places a script within a document. This element may appear any
number of times in the
BODY <> of an HTML

So as long as you don't worry about readable markup (JSF isn't famous for
that anyway), you can just put your scripts into the body.

The best solution would concatenate all scripts used on one page into one
single file, put in the head of the page. The overhead of a few more lines
of code then actually necessary on the current page is compensated through
the reduced overhead of the reduced number of requests.

View raw message