emptygif
زبان: اردو

تمام زبانیں اور فریم ورکس

nginx (empty_gif) nginx

nginx (empty_gif) کے لیے nginx کا اسنیپٹ جو /pixel.gif کی درخواستوں کا جواب خالی GIF سے دیتا ہے، جسے اسٹارٹ اپ پر ایک بار ڈیکوڈ کیا جاتا ہے۔

nginx (empty_gif) nginx

فائل
pixel.conf
چلائیں
nginx -s reload
# ngx_http_empty_gif_module ships with standard nginx builds. empty_gif always
# serves nginx's own built-in 43-byte transparent 1x1 GIF; its bytes can't be
# changed (to serve your own GIF, use the static-file or njs variants).
server {
    listen 8080;

    location = /pixel.gif {
        empty_gif;
        add_header Cache-Control "no-store";
    }
}

ہم نے یہ اسنیپٹ چلایا اور اس کی لوٹائی ہوئی بائٹس کا موازنہ کیا۔

جانچیں

curl -sI http://localhost:8080/pixel.gif

آفیشل سائٹ: nginx (empty_gif)

nginx میں مزید