Let Nginx handle browserconfig.xml 404 errors with this inline config

If you find lots of 404 errors for browserconfig.xml files in your log files then this little trick might help. Since Windows 8 Microsofts IE requests this file from the site root to configure the desktop tiles in Windows 8.

If you just want to get rid of those 404s you can serve an empty browserconfig.xml inline from your Nginx config file:

location = /browserconfig.xml {return 200 "<?xml version=\"1.0\" encoding=\"utf-8\"?><browserconfig><msapplication></msapplication></browserconfig>";}