View Full Version : CAN this work: Tracking image outside the BODY tag???
06-01-2005, 11:30 PM
Just curious....can you put a img src call outside the body tag but in the HTML tag?
what would be the ramifications? Would it cause loading issues if the site is hit by millions of users?
I just never heard of this, and I want to cover my bases?
06-02-2005, 12:32 AM
I don't see why not. I mean, it's horrible coding, but I've seen worse (i.e., no body tag at all). I certainly wouldn't recommend it.
Why would you want to do this?!
06-02-2005, 12:38 AM
it should work, but as Rich says whats the point of doing that? :D
06-02-2005, 12:56 AM
sometimes if the "img" doesn't resolve, browsers hang up and doesn't load the rest of the doc.....
....so, I figure if I code after the body tag....the page will load regardless of whether the image can resolve or not....
06-02-2005, 02:49 AM
I thought that was more of a table thing? As in, if the table didn't resolve, then the rest of the page wouldn't render. Semantic coding took care of that.
I see the idea, but just for the record I don't think a) it's a good one or b) it'll do what you intend it to.
06-02-2005, 07:01 PM
so, what would you suggest?
I have a need for a 1 x 1 pixel tracking image.....sometimes in the past, when this was implemented and the image wasn't loading, on some browsers ---- the page wouldn't render, it would time out..
so, in trying to solve this......perhaps if I put it after the body tag, we can alleviate this 'load' issue because the page would load, THEN the img src would be called.
Can you see a better way of doing this?
06-02-2005, 09:13 PM
What I am looking for is if this will be a viable workaround for using a tracking image WITHIN the body tags..and having the IMG SRC hang, and then the page won't load..
so, will using AFTER the BODY tag, will that prevent the loading issue...?
What I have found that on SOME browsers, if a image can't be resolved, the page will hang....I am trying to resolve this by putting the image AFTER the body tag....
hopefully the page loads....THEN the img src call is tried....
06-02-2005, 09:43 PM
Like I said, I don't think this is an IMAGE thing, I think this is a TABLE thing. A webpage can't render until all the tables are loaded and rendered. That's one reason why table layout is such a bad idea.
If I'm wrong, someone please interject, but as far as I know, simply coding to standards will get rid of this issue you're having.
06-02-2005, 09:50 PM
I don't think so...
In a case where I did this before, the server serving the image was down....the image call couldn't resolve --- so the page wasn't loading....NOW, this isn't in all browsers, only some....when the image was removed...the page loaded.
So, I dno't think in this case, its a table issue.
Besides, I am not trying to deal with HTML and tables and such...
I am trying to understand if BY PUTTING an Img src call (for tracking) outside the
Body tag...will this alleviate any issues IF the server that is holding the image is down...
06-03-2005, 02:08 AM
What more do you want? Its not good to do it but what stops you from testing your theory? Nothing. See if it gets the result you want if it does then do it. I don't think you are all to worried about web standards so what does it matter?
06-03-2005, 07:24 AM
By 'tracking image', do you mean some means of tracking visitor numbers based on the number of times the image is called?*
If that's actually the facility you're after then you should perhaps consider alternative methods, such as a simple PHP counter.
There are plenty of prefrabricated scripts available at HotScripts.com e.g. http://www.hotscripts.com/Detailed/48373.html
* If it's a 3rd-party image required to track referals or conversions, then perhaps you should consider an affiliate with better server uptime.
06-03-2005, 06:59 PM
well, I work with a very very big company.
So the idea of the tracker is to pass ALOT of vars from the http headers and such...
its not a simple image/count tracker....its much deeper than that.
I guess we 'could' test this out...but before I did that, I thought to inquire here to see if someone knew anything about the significance of this.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.