|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Bannato
Iscritto dal: Jul 2005
Messaggi: 77
|
[javascript] cookie
ciao,
io devo scrivere in un cookie un file che prendo dal computer locale, sono già riuscito a leggere il file, ma quando vado a scrivere il cookie mi da questo errore: Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit. .... io per scrivere il cookie uso questa funzione: Codice:
function SetCookie(name, value)
{
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = ( 2 < argc) ? argv[2] : null;
var path = ( 3 < argc) ? argv[3] : null;
var demain = ( 4 < argc) ? argv[4] : null;
var secure = ( 5 < argc) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((demain == null) ? "" : ("; demain=" + demain)) +
((secure == true) ? "; secure" : "");
}
ciao e grazie |
|
|
|
|
|
#2 | |
|
Senior Member
Iscritto dal: Nov 2005
Città: TO
Messaggi: 5206
|
Quote:
Se vuoi avere qualche info in più puoi leggere, ad esempio, questo articolo della Microsoft: Number and size limits of a cookie in Internet Explorer
__________________
Andrea, SCJP 5 (91%) - SCWCD 5 (94%) |
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 00:15.



















