0

I may already have an answer here, but I do not master the subject and I need help with this cookie on a website:

<script>
function setCookie(cname,cvalue,exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires=" + d.toGMTString();
document.cookie = cname+"="+cvalue+"; "+expires;
}
function salvarCookie() {
var url = window.location.href;
var tamanho = url.length;   
var codigo = url.substring(tamanho-37, tamanho-10);
setCookie("Recuperar-Boleto", codigo, 30);
}
</script>

What needs to be changed to expire in 3 days? Can you help me?

0 Answers0