Copy link to clipboard
Copied
HTML/CSS/JS extension panel:
Is it possible to save the panel settings in a 'cookies', as in a standard web browser?
If this is possible, how?
Thanks!
Сообщение отредактировано: m s
Instead of "cookies" is better to use Storage object.
It is much more convenient and works in any version of CC-Illustrator.
Maybe this topic is in the wrong section.
Copy link to clipboard
Copied
The version of the OS and Illustrator: Illustrator CС/2015x64, OS Win8.1x64
The guide "USING THE ADOBE EXTENSION SDK" says that "cookies" are stored here:
"CEP 4.2 supports persistent cookies stored in the user's file system:
In Windows: C: \ Users \ <user> \ AppData \ Local \ Temp \ cep_cookies "
Is this true for CEP5 / 6?
How to write and how to read out the information?
Method document.cookies = 'VasyaPupkin' does not work. Why is that?
Maybe I'm in the wrong section posted topic.
Request to moderators: transfer, please subject to the correct partition (say, Illustrator Scripting).
Thanks!
Copy link to clipboard
Copied
The CC2014 can't neither record nor considered a "cookie".
But this function is works fine in CC 2015 Illustrator:
function setCookie ( name, value, options /*expires,path,domain,secure*/ ) {
options = options || {};
var expires = options.expires;
if ( typeof expires == "number" && expires ) {
var d = new Date ();
d.setTime ( d.getTime () + expires * 1000 );
expires = options.expires = d;
}
if ( expires && expires.toUTCString ) {
options.expires = expires.toUTCString ();
}
value = encodeURIComponent ( value );
var updatedCookie = name + "=" + value;
for ( var propName in options ) {
updatedCookie += "; " + propName;
var propValue = options[ propName ];
if ( propValue !== true ) {
updatedCookie += "=" + propValue;
}
}
document.cookie = updatedCookie;
}
Does this mean that the version CC2014 "cookie" does not work as it should?
Can I do something wrong?
Copy link to clipboard
Copied
Instead of "cookies" is better to use Storage object.
It is much more convenient and works in any version of CC-Illustrator.
Maybe this topic is in the wrong section.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now