DEV Community

Ayako yk
Ayako yk

Posted on

Relearning JavaScript: An Introduction to In-Browser Capabilities

This blog marks the beginning of a new chapter in my learning journey—relearning JavaScript. After exploring HTTP(S) in previous posts, I’m excited to dive into JavaScript next. It’s going to be a long process, so each post will be short, focusing on specific topics and, hopefully, including some advanced insights.

Let’s start with the very basics of JavaScript.

Introduction
JavaScript is a scripting language that makes plain HTML interactive. It runs on devices with a JavaScript engine, which parses the script, compiles it into machine code, and executes it.

What In-Browser JavaScript Can Do:

  1. Enhance HTML by making it interactive
  2. Send requests to servers and handle responses (e.g., AJAX)
  3. Manage cookies and authentication
  4. Store data in local storage for user sessions and offline use

What In-Browser JavaScript Cannot Do:
For user safety, JavaScript is limited in accessing sensitive system-level features:

  1. It cannot directly access files, cameras, or microphones without explicit user permission
  2. It cannot interact with other tabs or windows unless explicitly allowed (e.g., via CORS or the Same-Origin Policy)

These restrictions ensure security and privacy.

Top comments (0)