From the MDC page for document.cookie
:
If not specified, [the path
argument] defaults to the current path of the current document location.
So in your case, it will be /folder1/folder2/
.
I didn't initially see that you'd specified "local" in the question title -- not sure if this was updated while I was writing my answer. Cookies are not set when browsing using the file:///
protocol, depending on the browser.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…