Applet (software): small programs embedded in web pages
Applet — a small program designed to run inside a web browser window. Historically associated with Java, applets provided interactive content but fell out of favor due to security and compatibility issues.
Overview
An applet is a compact computer program intended to run inside a host environment such as a web browser. Applets were most commonly distributed as part of web pages and executed within a confined runtime so they could add interactive features without forcing users to install full desktop applications.
Characteristics and lifecycle
Applet implementations typically provide a controlled execution model and an API that manages how the code interacts with the surrounding page and the client machine. In the Java world an Applet class (and later Swing variants) implemented a small lifecycle that the browser or plugin invoked. Common lifecycle stages include:
- init — prepare resources and user interface elements
- start — begin active execution or animation
- stop — pause background activity when the applet is no longer visible
- destroy — release resources before unloading
History and decline
Applets rose to prominence in the early web era when interactive client-side scripting was limited. Many early applets were written in Java, because the language and its virtual machine promised portability across platforms. Over time, native browser capabilities, stricter security models, and the removal of traditional plugin APIs led to a sharp decline in use: modern browsers moved away from supporting the plugin interfaces applets relied on.
Uses and examples
Historically applets powered small interactive features such as animated menus, drawing or charting tools, calculators, simple games, and educational demonstrations. They were a convenient way to embed functionality that was richer than early HTML and client-side scripting could provide. Organizations used signed applets to request elevated privileges for tasks like file access, though that practice was restricted by security policies.
Security, compatibility and alternatives
Because applets ran code on the client machine, they prompted careful sandboxing and permission controls. Security concerns, combined with platform and browser changes, encouraged developers to migrate away from applets. Common modern alternatives include JavaScript with HTML5 APIs, browser-based frameworks, and portable binary formats such as WebAssembly. For Java-specific desktop delivery, technologies other than in-browser applets have been preferred as browser support waned.
Notable distinctions
Applets should be distinguished from server-side app modules and from other in-page technologies like ActiveX controls or browser extensions: applets ran inside a host application that provided a life-cycle and sandboxing, while other technologies had different security and deployment models. Although largely historical now, applets played a key role in the evolution of interactive web content and influenced later client-side development patterns.
For general background on related topics, see what a program is, browser behavior at browser runtime, Java language pages, and the Java Applet class.
Related articles
Author
AlegsaOnline.com Applet (software): small programs embedded in web pages Leandro Alegsa
URL: https://en.alegsaonline.com/art/4999