Used Baidu statistics brothers have not noticed Baidu with a blank picture transmission 1x1 statistical parameters, make their own whether to use asynchronous statistics brothers static file to pass parameters. Why use a blank picture of it, rather than trying to store a small figure it, nginx inside the blank image is stored in memory, speed reading is definitely faster than the hard disk. Empty_gif look at how to use a 1x1 blank image generated in response to it. Perhaps ttlsa someday they ought to do statistics, we can also use empty_gif to pass parameters, he said go, certainly is still relatively small, can use third-party statistics on the use of third-party statistics. Well, get to the bar. nginx default built ngx_http_empty_gif_module module,
how to install nginx
I will not say more. empty_gif direct look at the usage of
nginx configuration
nginx module ngx_http_empty_gif_module will respond 1x1 GIF image.
location = /_.gif {
empty_gif;
}
Here is my
nginx configuration
server {
listen 80;
server_name test.ttlsa.com;
access_log /data/logs/nginx/test.ttlsa.com.access.log main;
index index.html index.php index.html;
root /data/site/test.ttlsa.com;
location ~* /3145/
{
empty_gif;
}
}
Test empty_gif
access test.ttlsa.com/3145/ results are as follows: [caption id = "attachment_3149" align = "alignnone" width = "565"]
empty_gif nginx blank picture [/ Caption]
empty_gif command
syntax: empty_gif; default: - Configuration section: location on response 1x1 blank picture
last
empty_gif most used local or statistics, of course, you think the place can also be used, as long as you need it, after all, the memory faster than hard disk very please indicate the source:. http: //www.ttlsa.com/html/3145.html
Reproduced in: https: //my.oschina.net/766/blog/211285