32 Lecture
CS506
Midterm & Final Term Short Notes
Session Tracking 2
Session tracking 2 encompasses techniques like cookies, URL rewriting, and hidden form fields. These methods enable web apps to retain user data between requests, ensuring personalized experiences and smoother interactions.
Important Mcq's
Midterm & Finalterm Prepration
Past papers included
Download PDF
Absolutely, here are 10 multiple-choice questions (MCQs) related to advanced session tracking techniques, including cookies, URL rewriting, and hidden form fields, along with their solutions and multiple options:
**Question 1:** Which mechanism involves adding session information as a parameter to URLs for session tracking?
**Options:**
A) Cookie tracking
B) Hidden form fields
C) URL rewriting
D) IP tracking
**Solution:** C) URL rewriting
**Question 2:** What is the primary purpose of URL rewriting in session tracking?
**Options:**
A) To improve website loading speed
B) To prevent unauthorized access
C) To personalize user experiences
D) To restrict session duration
**Solution:** C) To personalize user experiences
**Question 3:** In URL rewriting, how is session information typically added to URLs?
**Options:**
A) As an HTTP header
B) As a request parameter
C) As a hidden form field
D) As a cookie attribute
**Solution:** B) As a request parameter
**Question 4:** How do hidden form fields contribute to session tracking?
**Options:**
A) They store session IDs in cookies
B) They add session information to URLs
C) They pass session data within HTML forms
D) They rewrite URLs for session tracking
**Solution:** C) They pass session data within HTML forms
**Question 5:** What is the primary advantage of using cookies for session tracking?
**Options:**
A) They are immune to session hijacking
B) They can store large amounts of data
C) They provide a seamless user experience
D) They eliminate the need for URL rewriting
**Solution:** C) They provide a seamless user experience
**Question 6:** How does a browser store cookies related to session tracking?
**Options:**
A) In server databases
B) In session attributes
C) In client-side storage
D) In URL parameters
**Solution:** C) In client-side storage
**Question 7:** What is the typical scope of a session cookie?
**Options:**
A) Limited to the current browser tab
B) Limited to the current request
C) Limited to the current session
D) Limited to the current user
**Solution:** C) Limited to the current session
**Question 8:** Which of the following is NOT a session tracking technique?
**Options:**
A) Hidden form fields
B) IP tracking
C) URL rewriting
D) Cookies
**Solution:** B) IP tracking
**Question 9:** How do hidden form fields ensure session continuity?
**Options:**
A) By embedding session IDs in URLs
B) By attaching session attributes to cookies
C) By storing session data in client-side storage
D) By passing session data within HTML forms
**Solution:** D) By passing session data within HTML forms
**Question 10:** Which session tracking technique is effective even if cookies are disabled?
**Options:**
A) URL rewriting
B) Hidden form fields
C) IP tracking
D) Server-side storage
**Solution:** A) URL rewriting
Subjective Short Notes
Midterm & Finalterm Prepration
Past papers included
Download PDF
Certainly, here are 10 short-answer questions related to advanced session tracking techniques, including cookies, URL rewriting, and hidden form fields, along with their answers:
**Question 1:** What is URL rewriting in session tracking?
**Answer:** URL rewriting involves appending session-related data as parameters to URLs. This enables maintaining session continuity even if cookies are disabled.
**Question 2:** How do hidden form fields contribute to session tracking?
**Answer:** Hidden form fields embed session-related data within HTML forms, allowing the data to be passed between pages when forms are submitted.
**Question 3:** What is the primary advantage of using cookies for session tracking?
**Answer:** Cookies provide seamless session tracking as they can store session IDs on the client's browser, making subsequent requests easily identifiable.
**Question 4:** How does URL rewriting differ from cookies in session tracking?
**Answer:** URL rewriting adds session information to URLs, while cookies store session information on the client's browser, making it available for subsequent requests.
**Question 5:** Why is session hijacking a concern in session tracking?
**Answer:** Session hijacking occurs when an attacker gains unauthorized access to a user's session. Proper security measures are essential to prevent this.
**Question 6:** What is the purpose of using hidden form fields for session tracking?
**Answer:** Hidden form fields allow the exchange of session-related data between web pages when users submit forms, maintaining session continuity.
**Question 7:** What is the significance of the session timeout in session tracking?
**Answer:** The session timeout defines the duration a session remains active without user activity. It enhances security and resource management.
**Question 8:** How can you ensure secure session tracking?
**Answer:** Secure session tracking involves using secure cookies, implementing HTTPS, and validating user input to prevent session-related vulnerabilities.
**Question 9:** How do session cookies differ from persistent cookies?
**Answer:** Session cookies are temporary and expire when the browser is closed, while persistent cookies are stored for a longer duration, even after the browser is closed.
**Question 10:** How does client-side storage of cookies contribute to session tracking?
**Answer:** Client-side storage of cookies allows the browser to retain session information, making it available for subsequent requests and interactions with the web application.