Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    349
    Thanks
    2
    Thanked 0 Times in 0 Posts

    CAN this work: Tracking image outside the BODY tag???

    Hey all,

    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?

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    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?!

  • #3
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts
    it should work, but as Rich says whats the point of doing that?

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    349
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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....

  • #5
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    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.

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    349
    Thanks
    2
    Thanked 0 Times in 0 Posts
    ok..

    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?

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Posts
    349
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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....

    yes/no/maybe....please advise

  • #8
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    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.

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Posts
    349
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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...
    ?????

    please advise,.

  • #10
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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?

  • #11
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    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.

  • #12
    Regular Coder
    Join Date
    Jun 2002
    Posts
    349
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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.

    thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •