Growing Cilantro Indoors
I've kept cilantro indoors successfully in a southern facing window using a 12 inch pot planted out with shallow rooted herbs like chives. That way I maximize the use of the large pot and still manage to give the cilantro what it needs. Everybody ends up healthy and happy.
Cilantro likes a sunny location, but avoid placing it right next to a window in high heat regions, especially during the hottest part of the summer. The combination of light and heat will likely burn cilantro's delicate leaves. Placing plants a foot or two from the windowpane is a good precaution. If heat from the window is uncomfortable for you, it will probably damage plants that aren't desert hardy (like cactus and succulents).
If you try keeping plants in a less light intensive spot, like in an eastern facing window, make sure you can see the shadow of your hand when the light's shining. Bright light for around six hours a day should be adequate.
Potted Cilantro Outdoors
To keep cilantro on my deck in summer, I mulch the plant well, including a layer of shredded newspaper. I also improvise a water reservoir using a two-liter bottle. Here's how:
I plug the opening at the neck of the bottle with a small piece of kitchen sponge, cut out the bottom of the bottle and then upend it into the pot. When I fill the bottle with water in the morning, it keeps the soil moist during the hottest part of the afternoon.
Another problem with cilantro is that it's prone to bolting. To keep leaf production up and delay the onset of flowering, pinch back flowers before they fully develop and harvest leaves regularly. There are a few other bolting avoidance tips you can follow, too. My post: How to Keep Plants from Bolting will tell you more.
For additional cilantro information, as well as a link to my Pico de Gallo recipe (fresh veggie salsa), visit: Growing Cilantro.