Different favicon for local version of site? It's a small thing, but it would be nice if a site running locally could use a different version of a favicon, to make it easier to separate local and live sites visible in browser tabs.

I had in mind a really simple implementation, where a local favicon would just have "_local" appended to the name of the current theme favicon, so:

favicon.ico
favicon_local.ico


Then, if the site is running locally, and if a local version of the favicon exists, use it instead.

My question - what's the best way to implement this? Also, what would be a good way to check if a site is running locally?

Thanks for any ideas, code, or pointers.
Do you use any versioning like Git? If so, you can just upload the real favicon to your live site, then change the favicon locally and add it to your .gitignore afterwards.