I've gone through this link which is a similar question.
In some places, capacitors are also used for ESD purposes.
In some places, along with capacitors, TVS diodes (or ESD diodes, not sure which term is correct) are used.
Can someone tell me where TVS diodes should be used and where capacitors should be used?