Home
Home Page
In detail about Robots.txt
Safe programming on PHP
We write elementary rassylhhik
Use of HTML-tables for a conclusion of diagrams
What is dorvei? Whether Banjat for them?
How to learn{find out} on what searches find my site in search machines?
Cunnings of tabulared design. (we form a framework of the table)
The guest book on PHP
BB-codes
We hide counters
Use of patterns of design in ASP.NET
RSS the generator
Search optimization of a site
Metatags
Optimization for MSN
We
Cookies - fresh rolls
Superdynamical webs - interfaces
Links
 

We hide counters

The most trivial way which I, should recognize, used long time, not knowing about his  lacks:



<div style = "display:none">

<! - SuperLog->

Code of the counter

<! -/SuperLog->

</div>


All is very simple - with the help of property display we clean{remove} from layout'b pages a code of the counter, thus Internet Explorer and Mozilla all the same process this code and load the hidden picture - schjotchik.


As appeared from small, but valuable disskusii, Opera and Safari do not load a picture - schjotchik. It is bad, t. To. In that case we lose of some visitors.


In a result was born such CSS a class (a little bit superfluous, but yes will be so) which suits all modern browsers:



div.stats {

display:inline;

height:0px;

left:-1000px;

margin:0px;

padding:0px;

position:absolute;

top:-1000px;

visibility:hidden;

width:0px;

}


In HTML (it is desirable, right after body) we write thus:



<div class = "stats">

<! - SuperLog->

Code of the counter

<! -/SuperLog->

</div>


P. S.

Dmitry Polubojarinov offers one more variant prjatanija counters: instead of vpisyvanija by means of document.write figure in the document, it is possible to create object Image and podgruzit` in him  figure.


Was:



document.write (' <a href = " http: // click.superlog.ru / "> <img '+' src = "

http: // hit.superlog.ru/cgi-bin/superlog/count? ' +superlog_r + ' "

border = "0" width = "88" height = "31" alt = "SuperLog"> </a> ');


Began:



cntHL_Img=new Image;

cntHL_Img.src ='http: // hit.superlog.ru/cgi-bin/superlog/count? ' +superlog_r;