← Back to home

Cookie Policy

Every cookie we set, why we set it, and how to control or remove it.

Cookie Policy

Effective Date: 7 October 2026
Last Updated: 7 October 2026
Website: cswithbari.com
Operated by: CS With Bari — O/A Level Computer Science LMS, Lahore, Pakistan


1. What Are Cookies

Cookies are small text files that a website places on your device (computer, tablet, or mobile phone) when you visit it. They are widely used to make websites work, work more efficiently, and to provide information to the owners of the site.

Cookies can be:

  • Session cookies — temporary cookies that are erased when you close your browser.
  • Persistent cookies — cookies that remain on your device for a set period of time, or until you delete them manually.
  • First-party cookies — cookies set directly by CS With Bari (cswithbari.com).
  • Third-party cookies — cookies set by external services we use (e.g., Google Analytics).

Cookies may store information such as your session identifier, preferences, or anonymised usage statistics. They do not typically store personally identifiable information such as your name or payment details directly.


2. How We Use Cookies

CS With Bari uses cookies for the following purposes:

  1. Authentication & Security — To keep you securely signed in to your student or administrator account, protect against cross-site request forgery (CSRF), and manage your session state across page navigations.
  2. Media Streaming — To authorise your access to HLS video lessons. A short-lived token cookie (120-second TTL) is issued each time you request a lesson video, ensuring that only enrolled students can access course content.
  3. Analytics — To understand how visitors use our public-facing pages (e.g., the homepage, about page, and contact page) so we can improve the user experience. Analytics data is aggregated and anonymised.
  4. Functionality — To remember your callback URL after login so you are redirected correctly after authentication.
  5. Live Classes — Live classes rely on your existing sign-in session rather than setting additional cookies. Access to a class is authorised per session by a short-lived room token supplied when you join.

We do not use cookies for advertising, retargeting, or building marketing profiles.


3. Types of Cookies We Use

CategoryDescriptionCan Be Disabled?
Essential / AuthenticationRequired to log you in, maintain your session, and protect your account from CSRF attacks. Without these cookies the platform cannot function.✖ No
SecurityShort-lived cookies used to verify your right to stream video content. Issued per-request and expire within 120 seconds.✖ No
AnalyticsSet by Google Analytics and Google Tag Manager on public pages. Used to measure page views, traffic sources, and user behaviour in aggregate.✔ Yes
Media StreamingTemporary HttpOnly cookies that carry a signed token authorising a single HLS video stream request.✖ No (required for video playback)

The table below lists every cookie that may be set when you use CS With Bari. This document is the authoritative cookie inventory for the Platform; the summary in our Privacy Policy mirrors it.

4.1 Production Environment (cswithbari.com)

Cookie NameTypePurposeDurationParty
__Secure-next-auth.session-tokenEssential / AuthenticationStores your encrypted JWT session token. Keeps you logged in across page loads and browser restarts (within the session window). Set as HttpOnly, Secure, SameSite=Lax, scoped to .cswithbari.com.Session / configured session TTLFirst-party
__Host-next-auth.csrf-tokenSecurityContains a CSRF token used to validate form submissions (e.g., sign-in and sign-out requests). Prevents cross-site request forgery attacks. Set as HttpOnly, Secure, SameSite=Lax, bound to the host (no domain attribute).SessionFirst-party
__Secure-next-auth.callback-urlFunctional / SecurityRecords the URL you were trying to visit before being redirected to the login page. After authentication you are sent to this URL. Set as HttpOnly, Secure, SameSite=Lax.SessionFirst-party
stream_token (video auth cookie)Media Streaming / SecurityA signed, short-lived HttpOnly cookie (120-second TTL) issued by /api/courses/stream to authorise a single HLS video playback request. Prevents unauthorised access to course video segments.120 secondsFirst-party
_gaAnalyticsGoogle Analytics primary tracking cookie. Used to distinguish unique users by assigning a randomly generated identifier.2 yearsThird-party (Google)
_gidAnalyticsGoogle Analytics cookie used to distinguish users. Stores and updates a unique value for each page visited.24 hoursThird-party (Google)
_gat / _gat_UA-*AnalyticsGoogle Analytics cookie used to throttle the request rate (limit data collection on high-traffic sites).1 minuteThird-party (Google)
_ga_<container-id>AnalyticsGoogle Analytics 4 (GA4) session and engagement tracking cookie.2 yearsThird-party (Google)
_gcl_auAnalyticsUsed by Google Tag Manager to experiment and store conversion data.90 daysThird-party (Google)

4.2 Development Environment (localhost)

When accessing the platform on localhost or a non-HTTPS origin during development, the authentication cookies are set without the __Secure- and __Host- prefixes and without the Secure flag, as HTTPS is not available on localhost:

Cookie NameTypePurpose
next-auth.session-tokenEssential / AuthenticationDevelopment equivalent of __Secure-next-auth.session-token.
next-auth.csrf-tokenSecurityDevelopment equivalent of __Host-next-auth.csrf-token.
next-auth.callback-urlFunctional / SecurityDevelopment equivalent of __Secure-next-auth.callback-url.

These development cookies are never set in the production environment.

4.3 Live Classes and the Parent Portal

Neither the live classroom nor the Parent Portal sets any additional cookies.

When you join a live class:

  • the room access token is passed to the conferencing client in the page URL rather than stored in a cookie;
  • meeting state — the participant list, your mute and camera state, and any in-class chat — is held in the page for the duration of the session and is not persisted in cookies;
  • your existing __Secure-next-auth.session-token is scoped to .cswithbari.com, which includes live.cswithbari.com, so signing in once keeps you signed in across the site.

The Parent Portal uses the same session cookie as the rest of the site.

Attendance, in-class chat, and class recordings are not cookies. They are personal data held in our database and on our own infrastructure, and are described in our Privacy Policy.


5. Third-Party Cookies

Google Analytics & Google Tag Manager

We use Google Analytics and Google Tag Manager to collect anonymised statistics about how visitors interact with public pages of cswithbari.com. This helps us understand which content is most useful and how to improve the learning experience.

Google Analytics sets several cookies on your device (listed in Section 4) to:

  • Count the number of unique visitors.
  • Record the pages you visit and the time spent on each page.
  • Measure traffic sources (e.g., direct, search engine, referral).
  • Track session duration and bounce rates.

Important: Google Analytics cookies are only active on public pages of cswithbari.com (e.g., the homepage, about page, contact page). They are not used within the authenticated student dashboard or admin portal.

Google acts as a data processor under our instructions and is bound by Google’s data processing terms. Google may transfer aggregated, anonymised data to its servers in the United States and other countries. For more information, see:

We do not use Google Ads, Google remarketing, or any other advertising-related Google product. No cross-site tracking or profiling for advertising purposes takes place.


6.1 Browser Settings

You can control and manage cookies through your web browser settings. Most browsers allow you to:

  • View cookies stored on your device.
  • Delete individual cookies or all cookies.
  • Block cookies from specific websites or all websites.
  • Receive a notification when a cookie is about to be set.

Instructions for managing cookies in common browsers:

BrowserInstructions
Google ChromeSettings › Privacy and Security › Cookies and Other Site Data
Mozilla FirefoxSettings › Privacy & Security › Cookies and Site Data
Apple SafariPreferences › Privacy › Manage Website Data
Microsoft EdgeSettings › Cookies and Site Permissions › Cookies and Site Data
OperaSettings › Advanced › Privacy & Security › Cookies

Please note: Blocking or deleting essential cookies (listed in Section 7) will prevent you from logging in and using the CS With Bari platform. Analytics cookies can be blocked without affecting your ability to use the service.

6.2 Opting Out of Google Analytics

You can prevent Google Analytics from collecting data about your visits to public pages by:

  1. Google Analytics Opt-Out Browser Add-on — Install the official add-on at tools.google.com/dlpage/gaoptout. This works across all websites that use Google Analytics.
  2. Browser-level cookie blocking — Block third-party cookies in your browser settings (see Section 6.1 above).
  3. Private / Incognito Mode — Cookies are not persisted between private browsing sessions, limiting tracking.

7. Essential Cookies

The following cookies are strictly necessary for CS With Bari to function and cannot be disabled while you are using the platform:

CookieReason It Is Essential
__Secure-next-auth.session-tokenWithout this cookie your login session cannot be maintained. Every authenticated page load verifies this token server-side. Removing it will immediately sign you out.
__Host-next-auth.csrf-tokenWithout this cookie, form-based actions (sign in, sign out) are rejected by the server as potentially forged requests.
__Secure-next-auth.callback-urlRequired for the login redirect flow to return you to the correct page after authentication.
Video stream auth cookie (stream_token)Required to authorise each HLS video segment request. Without it, video playback cannot be authenticated and lessons will not load.

We do not require your consent to set essential cookies, as they are necessary for the legitimate operation of the service you have requested. This is consistent with applicable privacy regulations.


8. Do Not Track

Some browsers include a Do Not Track (DNT) feature that signals to websites that you do not want to be tracked across sessions.

CS With Bari does not currently respond to Do Not Track signals, as there is no universally accepted standard for how websites should respond to such signals. However:

  • We do not track you across third-party websites.
  • We do not sell your data.
  • We do not use cookies for advertising or cross-site profiling.

You may opt out of Google Analytics tracking at any time using the methods described in Section 6.2.


9. Updates to This Policy

We may update this Cookie Policy from time to time to reflect changes in the cookies we use, changes in applicable law, or improvements to our platform. When we make material changes, we will:

  • Update the "Last Updated" date at the top of this page.
  • Post a notice on the CS With Bari platform or send a notification to registered users where required by law.

We encourage you to review this Cookie Policy periodically. Your continued use of cswithbari.com after changes are posted constitutes your acceptance of those changes.

Previous versions of this policy may be obtained by contacting us at the address below.


10. Contact Us

If you have any questions, concerns, or requests regarding this Cookie Policy or our use of cookies, please contact us:

CS With Bari
Lahore, Pakistan
§ cswithbari@gmail.com
cswithbari.com

We aim to respond to all privacy-related enquiries within 5 business days.


This Cookie Policy was prepared in accordance with applicable Pakistani data protection guidance and international best practices for cookie disclosures.