Welcome to WebmasterWorld Guest from 50.16.24.12

Can I Be Penalized for an URL in a Hidden DIV?

   
9:10 pm on Feb 4, 2005 (gmt 0)

10+ Year Member



Hello,

I'm creating a custom stats script for my sites. It involves placing a php script on each page that I want to track.

The programmer placed the php script into a hidden div like this:

<div style='display:none'>
<img src='h**p://www.site.com/dir/script.php?longlistofvariables></div>

Can I be penalized by Google for using this kind of technique?

I'm not asking how to solve it, but if it is legal or not.

I find it technique placed on a gray zone, but I'm not sure...

Thanks

11:22 am on Feb 5, 2005 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You could be penalized.
You might be penalized.

I argued long ago that any text that is hidden should simply be ignored, but my comments seemed to fall on deaf ears at Google.

In this case, it's a graphic that's hidden, but I wouldn't recommend assuming it'll be ok.

Use a wholly-transparent .gif image - that should be ok.

Also, using display:none might, on some browsers, cause the image to never be fetched and therefore page-hits could go uncounted.

Kaled.

11:36 am on Feb 5, 2005 (gmt 0)

10+ Year Member



Come on, it's not a link, not even text, just an image. I wouldn't worry about it. But as Kaled said, using a clear gif is just as invisible and a widely used method too.

I'm worrying more about Hn text that's replaced by a background image using css and the text being moved a mile or so off to the left of the visible screen area.
I want to do it, but never dared to.

2:20 pm on Feb 5, 2005 (gmt 0)

10+ Year Member



Thanks for your replies. It is not exactly an image. it is a php page called through an image tag. It works, but Im worried about being penalized by hiding this url in an IMG source and invisible div.

Anyway, I believe I should replace this with something more safe.

Thanks again.

Enrique

7:54 pm on Feb 5, 2005 (gmt 0)

10+ Year Member



Make it a one-by-one pixel gif which is always clear, and put the gif in robots.txt so spiders don't screw up your stats (although they still will on occasion).
2:17 am on Feb 6, 2005 (gmt 0)

10+ Year Member



First it isnt a link, and it is just calling a php script to get an image, its just same as placing an image in a hidden div. I do not thing there is any reason for it to be penalized. But using a 1x1 transparent gif would be better as kaled said some browser might not fetch it and as such the php script will not run for them.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved