Expire cookie on browser close or x mins
<p>I know that not putting an expires part in will create a session cookie. So the cookie gets deleted on browser close.</p>

<p>But I want to create a cookie that gets deleted either on browser close or x mins. (which ever occurs first say 10 mins).</p>

<p>So when I set the cookie, and stay logged in to application for more than 10 mins, even though I have not closed my browser, cookie must be deleted. 
How to do that?</p>