jQuery: The Write Less, Do More JavaScript Library

document.body is null on, Google Web optimiser redirects.

View: New views
2 Messages — Rating Filter:   Alert me  

document.body is null on, Google Web optimiser redirects.

by Roon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey all,

Head scratching here, We have Google Web Optimiser running some A/B
tests on our site.
Effectively Google drops a cookie that triggers a redirect to another
version of the same page.

We have (seemingly without change) started seeing a JS Error during
the redirection that is coming from jQuery. Specifically jQuery
1.3.2.
If I drop the version from 1.3.2 down to our old 1.2.6 version the
issue goes away.
Here is a firebug console output

document.body is null
   document.body.appendChild( div );\n

thanks in advance

Re: document.body is null on, Google Web optimiser redirects.

by Roon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

FYI anyone with this same issue..
Not really a JQuery issue. GWO control scripts need to be loaded
before jQuery. it is a race condition.
jQuery is still loading whilst the redirect is in operation.. hence no
body in the DOM.


On 6 Nov, 16:57, paulroon <paulr...@...> wrote:

> Hey all,
>
> Head scratching here, We have GoogleWebOptimiserrunning some A/B
> tests on our site.
> Effectively Google drops a cookie that triggers a redirect to another
> version of the same page.
>
> We have (seemingly without change) started seeing a JS Error during
> the redirection that is coming from jQuery. Specifically jQuery
> 1.3.2.
> If I drop the version from 1.3.2 down to our old 1.2.6 version the
> issue goes away.
> Here is a firebug console output
>
> document.body is null
>    document.body.appendChild( div );\n
>
> thanks in advance