@jansepar It's unclear to me how long to me how long session cookies last on most mobile browsers - so I think this could be a good compromise. I think you may be able to do this with a little less code:

    (new Date((new Date) + 180000)).toGMTString()