How to delete all cookies using Java Script

Here is a simple small function to delete all cookies using java script.You have to only call to this function.You can test this using firebug console.You can only remove cookies created by JavaScript.If a cookie was create by the server, then you cannot remove it through JavaScript.

This is a another method to delete cookies.