For security reasons it’s not automatically possible, nor recommended, to do 
what you want to do.



That said, you are on the right track concerning setting a cookie.



I don’t know this answer without doing some development and testing, but I will 
add these 2 thoughts:



1-      You should set the cookie explicitly on the ‘other’ domain. So when 
<@DOMAIN> = mydomain.com, set the cookie domain to ‘www.mydomain.com’ and vice 
versa. Let the current domain cookie be handled automatically by TeraScript.

2-      You should set the expiry explicitly. Probably for a few hours from 
now. You can also update the cookie expiry on each request. This should 
basically equal your variabletimeout.



Basically, Witango/TS will manage the local domain cookie for you. So the only 
thing you need to do is set a new cookie that essentially says “if this user 
goes to the other domain in the next x minutes, pass this cookie to the server”.



I would recommend using the ASSIGN action, and setting the Tango_UserReference 
variable in the cookie scope. And then either not setting the httpheader – or 
setting it, but include @SETCOOKIES.



It’s possible that setting this cookie will interfere with TS setting of the 
cookie – again I’d have to test – if so, then you may need to set both the 
current and other domains cookies at the same time. I concede that to do this I 
believe you would have to hand type the cookie syntax as you have below since 
you wouldn’t be able to set the Tango_UserReference variable twice.



Robert



From: WebDude [mailto:[email protected]]
Sent: Friday, October 12, 2012 1:38 PM
To: [email protected]
Subject: RE: TeraScript-Talk: USERREFERENCE



The problem is that I don't want to force users to use one or the other (www or 
non www). I would like the same userreference for each. I am trying to work 
with the header info. I got something to work, but with mixed results depending 
on the browser being used (no line breaks)...



<@ASSIGN local$httpHeader VALUE="HTTP/1.1 200 
OK<@CRLF>Content-Type:text/html<@CRLF>Cache-Control: no-cache, max-age=0, 
must-revalidate, proxy-revalidate<@CRLF>Pragma: no-cache<@CRLF>Set-Cookie: 
Tango_UserReference=<@USERREFERENCE>; path=\; 
domain=.mytargetpackaging.com;<@CRLF><@CRLF>">



Any ideas other ideas?



Thanks for the response!







  _____

From: Bill Downall [mailto:[email protected]]
Sent: Friday, October 12, 2012 9:55 AM
To: [email protected]
Subject: Re: TeraScript-Talk: USERREFERENCE



On Fri, Oct 12, 2012 at 10:34 AM, WebDude <[email protected]> wrote:



Okay... for a need that will take way to long to explain, is there a way to set 
the userreference the same for both WWW and non WWW users upon the first hit on 
a taf file? I am trying some funky stuff like loading an iframe with 2 calls to 
the domain, one with and one without the wwww... no joy. Any help would be 
appreciated.



Any ideas?



I haven't tested, but something like this in your header?



<@if "NOT '<@appfilepath>' contains 'www.'">

<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=http://www.<@cgiparam 
server_name>/<@cgiparam script_name>"">

</@if>



  _____

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.



  _____

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.



  _____

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.




----------------------------------------

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.

Reply via email to