javascript - jQuery Cookie not being set when followed by redirect -
this common question has more common answer, problem is, isn't working me.
i'm using jquery.cookie.js plugin, , noticed there iss bug hindered setting cookies , redirect @ same time i'll point out i'm using local wamp server build this.
i set cookie variable , redirect page per below code:
$.cookie("test", "hola!", { expires: 1, path: '/' }); if ($.cookie("test")) { window.location.href = "./test.cfm"; }
however, attempt redirect cookie not set. when remove redirect cookie set. i've tried multiple variations on theme, i've set ajax call server , set cookie there has same effect. i've used different methods of redirecting page same effect well.
my issue seems stem including both setting of cookie , redirect together.
extra info i'm using firebug see if cookies being set or not , sure i've set on redirect page (in coldfusion):
<cfoutput> #cookie.test#<br /> como estas? </cfoutput>
this returns -99.
all ideas welcomed.
Comments
Post a Comment