Forum Moderators: DixonJones

Message Too Old, No Replies

perl cookies vs js cookies

         

oilman

10:58 pm on Aug 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A client and I are building a system to track users based on the page by which they enter the site. The basic idea is if they land on index2.htm they have entered from an overture listing somewhere and we want to tag them as a 'no comission' customer and if they enter by any other page they are a 'comission customer'. So far the best idea we've come up with to hit them with a cookie and then pull the cookie during the order process so that we can determine what kind of sale it is.

That said what would be the pros and cons of using either js or perl to create the cookies. The product is a consumer level item that most people would purchase online from home during the evenings. The vast bulk of our users are ordering from the privacy of home.

jatar_k

11:02 pm on Aug 19, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The only thing that really comes to mind is js being turned off, against js.

Perl would give a lot more control and options of further development in the future, if needed.

Key_Master

11:17 pm on Aug 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't forget the meta option.

<META HTTP-EQUIV="set-cookie" CONTENT="cookievalue=xxx; expires=Wednesday, 30-DEC-99 23:59:59 GMT; path=/">

[edited by: Key_Master at 11:21 pm (utc) on Aug. 19, 2002]

oilman

11:19 pm on Aug 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



oh - I should mention that we also need to check if a cookie is already set or not and if so not to set a new one otherwise the cookie set on the overture landing page will always be overwritten as the surf into the site.

c3oc3o

7:17 pm on Aug 20, 2002 (gmt 0)

10+ Year Member



Sessions seem like the way to go, so you can keep track of the visitor even if he does not accept cookies.
I'm not sure of the Perl options (there must be libraries to do that kind of stuff), but in PHP 4 it's built in: [php.net...]