06-11-2018, 07:19 AM
Is there a reason why this code to set cookies does not work in Safari on ios 11.4?
The code has been in production for some time running Intraweb ultimate 14.2.7 with SSL but recent reports suggest it no longer works for iPhone users. Does anyone here have insight or experience with this?
function GetCookieValue(sName: String): String;
begin
Result := WebApplication.Request.CookieFields.Values[sName];
end;
procedure SetCookie(CookieName, CookieValue: String; ExpireIn: Real);
var
ExpireOn: Real;
begin
if ExpireIn <> 0 then
ExpireOn := GetUTCDateTime + ExpireIn
else
ExpireOn := -1; // session cookie
WebApplication.Response.Cookies.Add(THTTPCookie.Create(CookieName, CookieValue, '/', ExpireOn));
end;
The code has been in production for some time running Intraweb ultimate 14.2.7 with SSL but recent reports suggest it no longer works for iPhone users. Does anyone here have insight or experience with this?
function GetCookieValue(sName: String): String;
begin
Result := WebApplication.Request.CookieFields.Values[sName];
end;
procedure SetCookie(CookieName, CookieValue: String; ExpireIn: Real);
var
ExpireOn: Real;
begin
if ExpireIn <> 0 then
ExpireOn := GetUTCDateTime + ExpireIn
else
ExpireOn := -1; // session cookie
WebApplication.Response.Cookies.Add(THTTPCookie.Create(CookieName, CookieValue, '/', ExpireOn));
end;