Herbs and spices don't "go bad" in the usual sense, they just gradually lose their flavoring power--or as we say, their "oomph". The simplest way to assess freshness is with your nose. If the aroma is gone, its time to throw them away. If the aroma is not as strong as when you purchased them, add an extra pinch or two to taste and think of creative ways to use the remainder up quickly (e.g. garnishes, grilling, beverage toppers). Herbs lose their flavor more rapidly, you will notice a decrease after about a year. Ground spices will begin to lose potency in 1-2 years. Whole spices retain their potency for 3-4 years.
Heat, residual heat, moisture and light all shorten the life of dried herbs and spices. The best way to store herbs and spices is in an airtight glass bottle in a dark cupboard or drawer in the coolest part of the kitchen. Avoid placing spices directly over an oven or cooktop.
Olive oil should be kept airtight and stored in a cool, dark place. A cupboard, cool pantry or wine cellar is ideal. Ideally, olive oil should be used within 2 years of bottling or 12-18 months after opening. Olive oil should not be refrigerated. Some experts believe refrigeration "breaks" the flavor of the oil, while others believe olive oil will suffer from the conditions that often cause water to mix with the oil. Do not store olive oil in direct sunlight for an extended period of time or on top of the stove.