*

webcity

  • ****
  • 220 posts
Cookie for logged-in users
« on: June 06, 2021, 01:14:05 PM »
Hi,

I'm trying to enable LiteSpeed using the .htaccess file for the latest version of Oscalss.

Is there a way to create a cookie for logged-in users, or a cookie that says yes or no to being logged in? So that I can disable the cache for logged-in users.

Many thanks,
Spencer

*

dsf

  • *****
  • 261 posts
Re: Cookie for logged-in users
« Reply #1 on: June 06, 2021, 01:39:39 PM »
You mean Litespeed cache?

If so, i was never been able to make it to work.

*

MB Themes

Re: Cookie for logged-in users
« Reply #2 on: June 06, 2021, 01:56:23 PM »
Isnt user id stored in cookies for logged in user?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

webcity

  • ****
  • 220 posts
Re: Cookie for logged-in users
« Reply #3 on: June 06, 2021, 02:14:36 PM »
Hi,

Yes, LiteSpeed Cache.

The session ID is stored in a cookie for for all users.

I just need a way of knowing if a user has logged in or not, so that I can disable the cache for logged-in users.

The URL header is the same for all users:
cache-control: no-store, no-cache, must-revalidate
pragma: no-cache

The LiteSpeed cache would work well if the above was only shown for logged-in users and not for guests.

Any suggestions welcome :-)

Many thanks


*

MB Themes

Re: Cookie for logged-in users
« Reply #4 on: June 07, 2021, 10:48:39 AM »
@webcity
I meant user ID in cookies but it seems not to be there.
You could create javascript variable or via PHP to generate some block, create some meta tag... depends on litespeed
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots