Make a cookie containing the Member's ID 5.6
Permalink
Hi All,
I need my site to set a cookie containing the Member's ID. This will be useful for other functions later but for now I want to test for the contents of the cookie within .htaccess
The purpose is, if the cookie does not exist or if it is set to a member ID of 0 then I want to turn off server caching (I'm using Litespeed LScache).
The reason for that is, if I use Litespeed LScache when a user is logged in, an incorrect username is displayed. The username displayed is for the user who was logged in when the cache was created.
So, I want to enable server caching only for guest users.
Hope you can help, I don't know how to set cookies from within C5 but I pretty much understand the rest!
Thanks,
Mike
I need my site to set a cookie containing the Member's ID. This will be useful for other functions later but for now I want to test for the contents of the cookie within .htaccess
The purpose is, if the cookie does not exist or if it is set to a member ID of 0 then I want to turn off server caching (I'm using Litespeed LScache).
The reason for that is, if I use Litespeed LScache when a user is logged in, an incorrect username is displayed. The username displayed is for the user who was logged in when the cache was created.
So, I want to enable server caching only for guest users.
Hope you can help, I don't know how to set cookies from within C5 but I pretty much understand the rest!
Thanks,
Mike
BUMP
See also the following thread:
http://www.concrete5.org/community/forums/jobs1/collaborate-with-ex...
Thanks!
See also the following thread:
http://www.concrete5.org/community/forums/jobs1/collaborate-with-ex...
Thanks!
I need the exact same.
How to make it?
How to make it?
Therefore, for each visitor, using htaccess, I can check whether there is a CONCRETE5 cookie and an LSUNCACHE cookie with a value of 1. If there is no LSUNCACHE cookie, I can serve them the cached version of the page (static cache by Litespeed LScache). If they are logged in there will be a value of 1 in the LSUNCACHE cookie, so they will be served the uncached, live version (it will still have C5's own caching).
Does that logic sound right?
Anyone know how to create that cookie from within C5? **** C5.6 ****
Many thanks,
Mike