The Geolocation API works only on pages served over:

  1. HTTPS (secure context)
  2. Local files only
  3. HTTP without encryption
  4. FTP
Answer

A) HTTPS (secure context)

Browsers require a secure context (HTTPS) for geolocation.

Computer Science MCQ · More HTML5 for Mobiles MCQs · Practise