It is  a good idea to invest in a pair of good quality goggles if you are swimming regularly.  Somehow or rather, after using them a few times, you might notice that even though its a quality pair,  it gets foggy even though the brand indicates that they are anti-fog. 
The reason could be that we are not taking care of them properly.
Here are a few tips to extend the life of your pair of goggles.
1. Don't rub/touch the inside of the eye cup lens
Most swimmers will use their fingers, a towel or even spit on the inside of the eye cup lens (I know, gross right! LOL) to clean the lens or wipe away fog. Rubbing the inside of the goggle lens will cause damage, scratches and may even remove the anti-fog coating.
If your goggles are foggy simply dip them under the water and tip the lens down so the water runs out. This should clear away the fog.  Do note that the fog is caused by our body temperature and it will re-appear as our body heats up during laps, so you would need to do it a few times if you are swimming a lot of laps.
2.  Rinse after use
After every swim session, make sure you rinse them in cold fresh water (running tap would be good) and lay flat to dry. Goggles are not made to withstand heat, so do not use warm or hot water to rinse them as this will cause damage to the strap, clips and lens.
Do not use detergents or other chemical products to wash your goggles as these will also cause damage. Cold tap water is your best option.
3. Dry after rinsing
After you have rinsed your goggles, lay them flat to dry. Don't throw your goggles into your wet gear bag or wrap them up in a towel. This will cause bacteria and mould to breed and can cause damage to the goggles. Never leave your goggles out in the sun as the straps, clips and eye cups will dry out and break.
4.  What if my goggles has lost the Anti-fog properties?
You can purchase the anti-fog spray to improve the clarity again. Different anti-fog sprays has different instructions, so please follow closely to the instructions given.