nerdexam
CIW

1D0-720 · Question #41

What can you achieve with the HTML5 File API?

The correct answer is A. Directly read the contents of files stored on the user's computer. Option A is correct because the HTML5 File API gives JavaScript in the browser controlled access to files that a user explicitly selects (via an <input type="file"> or drag-and-drop), allowing your code to read their contents using the FileReader object - without needing a…

HTML5 APIs

Question

What can you achieve with the HTML5 File API?

Options

  • ADirectly read the contents of files stored on the user's computer.
  • BIncrease the storage capacity of the server.
  • CTrack the user's browsing history.
  • DStream live audio and video.

How the community answered

(26 responses)
  • A
    92% (24)
  • C
    4% (1)
  • D
    4% (1)

Explanation

Option A is correct because the HTML5 File API gives JavaScript in the browser controlled access to files that a user explicitly selects (via an <input type="file"> or drag-and-drop), allowing your code to read their contents using the FileReader object - without needing a server round-trip. Option B is wrong because the File API is entirely client-side and has no effect on server storage capacity. Option C is wrong because browsing history is managed by the browser itself and is deliberately off-limits to web pages for privacy reasons. Option D is wrong because live audio/video streaming is handled by separate APIs (MediaStream/WebRTC and the <video>/<audio> elements), not the File API.

Memory tip: Think of the File API as a "controlled file picker" - the user hands the browser a file, and JavaScript can then read it. The key word in the name is File - it reads files, nothing more.

Topics

#HTML5 File API#Client-side file access#File handling#JavaScript APIs

Community Discussion

No community discussion yet for this question.

Full 1D0-720 Practice