nerdexam
GIAC

GSEC · Question #191

Which of the following languages enable programmers to store cookies on client computers? Each correct answer represents a complete solution. Choose two.

The correct answer is B. Perl D. JavaScript. Both Perl and JavaScript provide built-in mechanisms to create and send cookies that are stored on the client's computer.

Cloud, Web, and Application Security

Question

Which of the following languages enable programmers to store cookies on client computers? Each correct answer represents a complete solution. Choose two.

Options

  • ADHTML
  • BPerl
  • CHTML
  • DJavaScript

How the community answered

(27 responses)
  • A
    7% (2)
  • B
    81% (22)
  • C
    11% (3)

Why each option

Both Perl and JavaScript provide built-in mechanisms to create and send cookies that are stored on the client's computer.

ADHTML

DHTML (Dynamic HTML) is a combination of HTML, CSS, and scripting technologies - not an independent language - and has no native cookie API of its own.

BPerlCorrect

Perl is a server-side scripting language that can set cookies by writing Set-Cookie HTTP response headers using modules such as CGI.pm, causing the browser to store the cookie on the client machine.

CHTML

HTML is a static markup language with no scripting or programming capability and cannot programmatically create or store cookies on a client computer.

DJavaScriptCorrect

JavaScript is a client-side scripting language that can directly read and write cookies on the client computer through the document.cookie API without requiring a round-trip to the server.

Concept tested: Server-side and client-side cookie storage languages

Source: https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie

Topics

#cookies#JavaScript#Perl#web scripting

Community Discussion

No community discussion yet for this question.

Full GSEC Practice