Skip to content

平成22年度 春期 ITパスポート試験 問59

This question's explanation and your answers so far.

問59
頻出度★★★

Webで使用される Cookie に関する記述として, 適切なものはどれか。

出典 平成22年度 春期 ITパスポート試験 問59
解説

問 59

  • Incorrectア

    “A format standard that lets you finely specify the layout of a document using HTML” describes a style sheet, that is, CSS (Cascading Style Sheets). CSS is a mechanism for specifying appearance — character size, color, placement and so on — separately from the HTML itself; it has no function of storing data in the browser, and it is an entirely different technology from a cookie.

  • Incorrectイ

    “A protocol that adds encryption functionality to HTTP” describes HTTPS (HTTP protected by SSL/TLS). It is a communication procedure for preventing eavesdropping and tampering along the communication path, not a mechanism for storing information on the browser side. A cookie can be used over HTTPS and over HTTP alike, and the two have different purposes.

  • Incorrectウ

    “A mechanism in which a Web server works with an external program to dynamically generate Web pages” describes CGI (Common Gateway Interface). It is an arrangement in which a program is started on the server side to build the resulting HTML, so the place where the processing is carried out is the server side. Its role differs from that of a cookie, which leaves information with the browser.

  • エ

    正解 The correct answer is エ. A cookie is a mechanism by which a Web server temporarily leaves a small amount of data with the browser that accessed it. The server hands the value to the browser through the Set-Cookie header of the HTTP response, and the browser stores it on its own side (the client side). The next time the browser accesses the same site, it automatically attaches the stored cookie to the request and sends it back, so the server can tell that this is the same user who came before. HTTP is originally a protocol that forgets its state after each exchange (a stateless protocol), so cookies make it possible to carry out processing that spans several pages, such as keeping a login state, holding the contents of a shopping cart, and remembering each user’s display settings. The facts that the storage place is the browser rather than the server, and that the data is held only temporarily with an expiration date, match the description in エ exactly.

ここがポイント
  • A cookie is a mechanism by which a Web server has the browser (the client side) store data temporarily. It carries over things such as login state and shopping cart contents on stateless HTTP, and is a representative means of session management.
  • Sort out the confusing Web-related terms by where they act and what they do: CSS = specifying appearance, HTTPS = encrypting communication, CGI = generating pages dynamically on the server side, cookie = storing data on the browser side.
用語

Your answers