
The answer: Favicons. When you have a large number of tabs open, they become the differentiating symbol between one website and another. We created 3 different favicons, one blue, one green, and one red. The blue is our production/default favicon, green is staging/QA, and red is development. We have these environments on different subdomains of YSFHQ, so it is easy to create a favicon filter using our subdomain naming convention. Environment identifiers must be the leftmost subdomain, such as dev.forum.ysfhq.com and qa.ysfhq.com. We can then use regex to detect a match to our naming convention, and apply the appropriate favicon.
Here's a snippet of our Nginx config that does just that.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~* /favicon(.*) { | |
log_not_found off; | |
access_log off; | |
root /var/www/default; | |
} | |
location = /favicon.ico { | |
if ($host ~* ^dev\.) { | |
rewrite ^/favicon\.ico$ /favicon-red.ico last; | |
} | |
if ($host ~* ^qa\.) { | |
rewrite ^/favicon\.ico$ /favicon-green.ico last; | |
} | |
} |
Until next time,
Eric Tendian
Chief Technology Officer
YSFlight Headquarters — YSFHQ.com