When building a new home or replacing windows, the best thing you can do is to opt for exterior screens. Screens reduce reflections and create a protective barrier if a bird does fly towards the glass.
For existing windows
You can add exterior screens using a product like Bird Screen.You can also make your own screen frames if your windows don’t have exterior screens.
Some windows are just not easily adapted with screens based on their shape, size or location. Lightweight mesh netting can be a very effective alternative in certain cases. It won’t help the birds see the window but can keep them from hitting it. Make sure there is enough room between net and window for a protective cushion and check netting frequently to avoid tangling.
There are a number of netting products sold under different brand names. They are often marketed as “Wildlife Netting” or “Fruit-tree netting” or even “Bird-netting.” Their purpose is to protect plantings from bird damage, but they are inexpensive, nearly invisible and can be easy to hang and remove for this purpose too. They may be most available seasonally when gardening supplies are most available.