This API saves a browser cookie.

Parameters:

Example:

The following code saves the current user to a cookie that will expire in 30 days:

pui.setCookie("user", currentUser, 30);