HI Jason

You can stick it in the <head> of the document although that will load it
prior to the rest of the document being loaded which may cause the page to
display a bit later than usual. The way around that issue is to use an event
listener on "load", it could even be delayed by a few seconds using a
settimeout but not too much that the visitor will leave before it fires.

Ggl only suggest sticking it at the end of the <body> to avoid interference
with page load issues, it's sort of a poor mans load handler.

I'm pretty sure having script in the <head> is ok for all html and xhtml
doctypes (strict transitional etc) so you can have your standards cake and
eat it too.

Cheers
James

-----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Jason Robb
> Sent: Thursday, July 26, 2007 4:25 PM
> To: [email protected]
> Subject: [WSG] Site test & Google analytics
>
> Hello everyone,
>
> I launched a site today. http://www.barbarawellsstudio.com - I'm looking
> for some criticism, any suggestions are appreciated. On a side note, I
> posted a thread back in late May on Photo Gallery markup. My solution is
> located here: http://www.barbarawellsstudio.com/collections/
>
> Also, when including Google Analytics, they ask to insert the script
> into the <body>, just before the end of the </body>.
>
> My question is this: If I insert the <script> anywhere but the <head>,
> does this break any rules or standards? Shouldn't all scripts be located
> in the head ONLY? Perhaps I am way off on this.
>
> Much thanks in advance,
>
> Jason Robb
> www.eleventy72.com
>
>


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to