Zen Cart Logo
Forums / General Questions / Why is one user getting 3 session ids?

Why is one user getting 3 session ids?

Views: 719

Results 1 to 5 of 5
14 Dec 2014, 8:46 PM
#1
mespe avatar

mespe

Zen Follower

Join Date:
Sep 2014
Location:
ohio
Posts:
216
Plugin Contributions:
0

Why is one user getting 3 session ids?

Still new to this all (i.e. awaiting first sale) so I've been watching the who's online page.
I seen alot of bots, and apparantly a few potential customers.
well at any rate, while looking at who's online, I noticed one user (unique IP) has three session ids, is this normal and correct?

14 Dec 2014, 9:12 PM
#2
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Why is one user getting 3 session ids?

Cannot say for sure, but when more than one device behind a proxy or NAT is accessing the site this can occur (each device has it's own session). This can also occur if more than one browser is being used on the same computer (each browser has it's own session). Or when one is using multiple incognito / private / guest tabs (those modes open new browser sessions - so can result in multiple open sessions).

Another case where I have seen this behavior is when customer have a "privacy" add-on installed in their browser. Some of these will allow the browser to accept the session cookie, but then filter and remove the session cookie. When the cookie is removed, this would result in a new session being started as the web server has no way to know a session was already open (and even by IP address if the request came from the same device or browser).

I guess I would not lose any sleep over seeing 1-10 multiple sessions open from one IP address, as NAT is very common (the "router" or "wifi" devices in most homes and businesses use this) and people are starting to use "incognito", "private", and "guest" modes more often. However if I saw a large number of sessions being opened from from a single IP address and causing performance issues on the web server, then I would act to discover who owned the IP address (and if they may have a reason for many open sessions) and potentially ban the IP for a few hours (until it stops misbehaving).

14 Dec 2014, 9:59 PM
#3
mespe avatar

mespe

Zen Follower

Join Date:
Sep 2014
Location:
ohio
Posts:
216
Plugin Contributions:
0

Re: Why is one user getting 3 session ids?

Ok, so How does one ban an IP address?

14 Dec 2014, 11:13 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Why is one user getting 3 session ids?

mespe:

Ok, so How does one ban an IP address?
If you REALLY feel that you need to block an IP address ...

  1. Who's your hosting company?
    They probably have a tutorial on how to block IP addresses using your hosting control panel.

  2. Alternatively you could add appropriate blocking commands to a new .htaccess file you manually create in the root of your store. (Zen Cart comes with several .htaccess files which you should NOT touch. But it doesn't have one in the "root" (top folder) of your store. You can create one there for any special .htaccess rules you wish to add to your site.)

14 Dec 2014, 11:23 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Why is one user getting 3 session ids?

NOTE: you might check what is happening when someone opens multiple windows so that you do not ban a happy shopper about to buy $1000.00 worth of Christmas products from you ...