Q. The other name for Comet is

  • (A) Server Push
  • (B) Ajax Push
  • (C) HTTP Streaming
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the mentioned
Explanation: Other names for Comet include “Server Push”, “Ajax Push”, “HTTP Streaming”.

Q. Which is the element that has a src property to initiate HTTP GET request?

  • (A) img
  • (B) iframe
  • (C) script
  • (D) both img and script
πŸ’¬ Discuss
βœ… Correct Answer: (D) both img and script
Explanation: Both img and script contains the src property thatt can be set to initiate an HTTP GET request.

Q. XMLHttpRequesr is a

  • (A) Object
  • (B) Class
  • (C) Both Object and Class
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both Object and Class
Explanation: XMLHttpRequest is both an object and a class.

Q. Which of the following are the features of an HTTP request?

  • (A) URL being requested
  • (B) Optional request body
  • (C) Optional set of request headers
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the mentioned
Explanation: An HTTP request consists of four parts :

Q. Which of the following is a feature of the HTTP response?

  • (A) Mandatory response body
  • (B) Optional response body
  • (C) URL being released
  • (D) Optional set of response headers
πŸ’¬ Discuss
βœ… Correct Answer: (A) Mandatory response body
Explanation: The HTTP response sent by a server has three parts :

Q. Which is the appropriate code to begin a HTTP GET request?

  • (A) request.open("GET","data");
  • (B) request.open(GET,"data.csv");
  • (C) request.open("GET","data.csv");
  • (D) request.open("GET");
πŸ’¬ Discuss
βœ… Correct Answer: (C) request.open("GET","data.csv");
Explanation: The code that begins a HTTP GET request for the contents of the specified URL is

Q. Cookies were originally designed for

  • (A) Client-side programming
  • (B) Server-side programming
  • (C) Both Client-side & Server-side programming
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) Server-side programming
Explanation: Cookies were originally designed for server-side programming, and at the lowest level, they are implemented as an extension to the HTTP protocol.

Q. The Cookie manipulation is done using which property?

  • (A) cookie
  • (B) cookies
  • (C) manipulate
  • (D) none of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) cookie
Explanation: There are no methods involved: cookies are queried, set, and deleted by reading and writing the cookie property of the Document object using specially formatted strings.

Q. Which of the following explains Cookies nature?

  • (A) Non Volatile
  • (B) Volatile
  • (C) Intransient
  • (D) Transient
πŸ’¬ Discuss
βœ… Correct Answer: (D) Transient
Explanation: Cookies are transient by default; the values they store last for the duration of the web browser session but are lost when the user exits the browser.

Q. Which attribute is used to extend the lifetime of a cookie?

  • (A) higher-age
  • (B) increase-age
  • (C) max-age
  • (D) lifetime
πŸ’¬ Discuss
βœ… Correct Answer: (C) max-age
Explanation: If you want a cookie to last beyond a single browsing session, you must tell the browser how long (in seconds) you would like it to retain the cookie by specifying a max-age attribute. If you specify a lifetime, the browser will store cookies in a file and delete them only once they expire.