Can counter be hidden?

liunx

Guest
Hi!<br />
<br />
I got my hit counter from my host provider and it works ok. Since I just red the "Design Hell" article I wonder if I can hide a counter to visitors but I as the sitemaster would be still able to "view" it somehow.<br />
<br />
Counter is presented as an <img> tag with a link to a server on my webhost. Hope that helps possible solutions.<br />
<br />
Thanx, ivo.<!--content-->You could use CSS to hide it from the user (e.g., <img src=http://www.webdeveloper.com/forum/archive/index.php/"counter.php" alt="" style="display: none;" />). And when you actually wanted to view it, simply access the file being referenced for the image. This way, the counter will still update and the user won't even know it's there, however, you can still view it as you wish.<!--content-->Uh, such a fast answer!<br />
<br />
Yes, I will try what your suggestion but first 2 questions:<br />
<br />
- since I don't (yet) use css for my whole page I ask if I have to put on it code like content="text/css" and<br />
<br />
- don't know exactly what you mean with:<br />
"access the file being referenced for the image"<br />
<br />
Can you explain this little more please?<!--content-->Originally posted by ivo <br />
Uh, such a fast answer!Of course. ;)Originally posted by ivo <br />
since I don't (yet) use css for my whole page I ask if I have to put on it code like content="text/css"Nope; however, it would be preferred to create a stylesheet to apply the CSS to the element, however. As is, it will work fine, but you really should create a simple stylesheet like this:<style type="text/css"><br />
/*<![CDATA[*/<br />
.hide { display: none; }<br />
/*]]>*/<br />
</style><img src=http://www.webdeveloper.com/forum/archive/index.php/"counter.php" alt="" class="hide" />Originally posted by ivo <br />
don't know exactly what you mean with: "access the file being referenced for the image"Very sorry for the lack of clarity. All I mean is, in the example above, note that the file being referenced for the src attribute of the image is counter.php; just access that file in your browser if you wish to see what the counter is currently at.<!--content-->or if there's a lot, you can put<br />
<br />
<div style="display: none;"><br />
Counter stuff<br />
</div><!--content-->Great!<br />
<br />
I tried it both ways (fredmv's and Inca's) and it works with both, of course. <br />
But I noticed that alt="" was already there and infact I only had to add class="hide" to the tag. And of course <style> tag.<br />
<br />
Just to let be known to other viewers my feedback (according to the "forum rules" from Javascript forum :D :D )<!--content-->Originally posted by ivo <br />
Great!<br />
<br />
I tried it both ways (fredmv's and Inca's) and it works with both, of course. <br />
But I noticed that alt="" was already there and infact I only had to add class="hide" to the tag. And of course <style> tag.<br />
<br />
Just to let be known to other viewers my feedback (according to the "forum rules" from Javascript forum :D :D ) keep in mind though, not all counting services want their counter to be hidden. Extreme-dm gets pissy about that kind of stuff. ;)<!--content-->You could, however, hide the counter while still providing a link to the service's site. That's merely a guess though — you'd have to read through their TOS to see if this is even a valid option.<!--content-->Well as I wrote I didn't get it from such company because I used one that my web host provider offered me. <br />
<br />
So I guess in my case the counter is only there to help me with my site so I can see how many visitors I have.<br />
<br />
Oh, and it's not one of those counters who goes up 1 every time you refresh it. As I payed attention to it I think it refreshes only when a visitor with new IP comes to my site.<br />
<br />
So it's okay I guess ;) but thanx anyway for information. i didn't think of that and I'll keep in mind that :D .<!--content-->
 
Back
Top