I have the following code:
[..]
var img = document.createElement('img');
img.src = 'www.example.com/pixeltracking';
[.. more stuff..]
that works well in Chrome but in Firefox I’ve never saw finish the request.
When I add the image to the DOM, now Firefox finish the load but chrome stop the code execution without any error message.
[..]
var img = document.createElement('img');
img.src = 'www.example.com/pixeltracking';
document.body.appendChild(img);
[.. more stuff..]
Any idea? Thanks
The problem with your code is that you forgot
http://in the url. Right now you are trying to loadwww.example.com/pixeltrackingrelative to the current URL, i.e. something likehttp://yourdomain.com/foobar/www.example.com/pixeltracking.