انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-038-L01

ملفات تعريف الارتباط (Cookies) وجلسات الخادم

  • الدرس 1 من 7
  • Junior
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

explain how a browser stays logged in with a session cookie.

الموضوعات المخطط لها

  • HTTP forgets you between requests; a session remembers you on the server.
  • After login the server stores the session and sends a cookie holding only a random session ID.
  • The browser sends the cookie automatically with each request.
  • HttpOnly: JavaScript cannot read the cookie. Secure: sent only over HTTPS. SameSite: limits sending on cross-site requests.
  • Server sessions are easy to revoke (delete the session) but need shared storage when you run many servers.
تفاصيل المخطط المبدئي

عرض عملي

a response header: Set-Cookie: SESSION=abc; HttpOnly; Secure; SameSite=Lax.

اختبر فهمك

Which attribute stops JavaScript from reading the cookie?

أظهر الإجابة

HttpOnly.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.