What is the reason why the chrome browser cookie of Apple computer system can't be written into it?

the code is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function setc(name, value, expiresHours,domain) {
        var cookieString = name + "=" + (!!value?encodeURI(value):"");

        if(domain!=undefined)
            domain=";domain="+domain;
        else
            domain="";

        //
        if (expiresHours > 0) {
            var date = new Date();
            date.setTime(date.getTime() + expiresHours * 24 * 3600 * 1000);
            cookieString = cookieString + domain+"; path=/; expires=" + date.toGMTString();
        }

        document.cookie = cookieString;
    }

    setc("hasread",true,250)
</script>


</body>
</html>
Mar.17,2021

chrome cookie does not support local protocols, so you can access
through file://xxx.html if you access the file through a web server.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ab27-2c22e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ab27-2c22e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?