[ic] Removing session ID from the URL

Jon Jensen jon at endpoint.com
Mon Jan 10 23:34:30 EST 2005


On Mon, 10 Jan 2005, Grant wrote:

> It looks like IC usually appends a session ID to all links on the
> first page of the session.  If IC gets a session cookie back from the
> user after that, it keeps the session IDs out of the links.  Is there
> any way to keep IC from appending session IDs right away?

If you don't want a session ID ever to appear in the URL, you can set this 
in catalog.cfg:

ScratchDefault  mv_no_session  1

(Note that that's different from the more common ScratchDefault 
mv_no_session_id 1.)

If you don't want a session on the links in the first page, but do want 
one later if the browser isn't returning cookies, you could set an 
Autoload like this in interchange.cfg:

GlobalSub session_trick <<EOR
sub {
     delete $::Scratch->{mv_no_session} unless $Vend::Cookie;
     return;
}
EOR

And then do this in catalog.cfg:

Autoload session_trick

That's untested. Let me know if it works. :) Maybe there's a better way to 
do that, but I can't think of one at the moment.

> Also, I've been noticing that after awhile IC will start serving pages
> with session IDs appended to all URLs.  I'm seeing it in Firefox 1.0
> on Linux.  I wonder if it's a Firefox or IC issue.  Has anyone else
> noticed this?

The only time that should happen is if you visit the admin, then go back 
to the regular storefront. The admin sets up your session to always add 
mv_session_id and mv_pc to your URLs, and that sticks even if you log out 
and go back to the storefront. If you get a totally new session that 
should go away.

Jon


-- 
Jon Jensen
End Point Corporation
http://www.endpoint.com/
Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ...


More information about the interchange-users mailing list