The problem with spices bought in a grocery store is that you really have no idea how long the spice has been sitting on a shelf in a warehouse, the conditions under which it was stored there and in shipping, conditions in the store.....well, you get the idea. If you can buy spice from a wholesale/retail place where the quality of spices is important, then store them properly at home, you're much better off. I haven't tried online retailers yet, but I would consider giving it a whirl.
I learned a lot working for my brother in law in his spice blending plant.