jcardena.com Blog Image maps, rollovers, and the craft of the early web
145 posts
EN ES

Image maps, rollovers, and the craft of the early web

Web

A look back at client-side image maps and rollovers reveals lessons in system fragility that apply directly to building modern AI and data architectures today.

Image maps, rollovers, and the craft of the early web

The first time I saw a navigation bar where buttons glowed under my mouse, it felt like a leap forward. This was an interface, not just a document. Behind that seamless graphic, however, was a series of clever, painstaking, and deeply brittle tricks. We didn't have component frameworks; we had table layouts, image tags, and a few lines of JavaScript. To build anything dynamic, you had to bend the medium to your will.

Slice PhotoshopMockupStitch in HTMLTableMap ClickableCoordinatesSwap Images withJavaScript
Early Web Interactivity Workflow

The Anatomy of a Lie: Sliced Images

That beautiful, monolithic navigation bar was a lie. It was a dozen small images, sliced from a Photoshop mockup and stitched back together inside an invisible HTML <table>. An engineer's job was to fracture a designer's ideal state into a grid. If a slice was off by a single pixel, you'd get a visible seam. If the table cell had the wrong padding, the entire mosaic would fall apart. It was a fragile architecture held together by border="0" and hope, but it gave us a canvas of individual pieces we could finally control.

Hand-Drawn Hitboxes and Brittle Coordinates

Slicing a complex shape into a grid wasn't always possible. For something like a map of a country with clickable regions, we used client-side image maps. This meant overlaying invisible, clickable polygons on top of a single image. The work was brutally manual. You’d load an image into an editor, trace a shape, and it would generate a long string of x,y coordinates for an <area> tag. As the HTML 4.01 Specification shows, this was a standardized, if clumsy, way to make arbitrary shapes respond to a click.

The system was incredibly brittle. A small design change—"can we make this region a little bigger?"—meant throwing out the coordinates and starting over. The coupling between the image asset and the coordinate-based logic was absolute. Change one, and the other broke.

Faking State with JavaScript and Cache Tricks

The real dynamism came from the rollover hover effect, our first foray into client-side state management. For each interactive image slice, we had two files: button_off.gif and button_on.gif. JavaScript event handlers like onMouseOver="this.src='button_on.gif'" and onMouseOut="this.src='button_off.gif'" would swap the image source. This introduced a new problem: the flicker on first hover as the browser fetched the "on" state image. The solution was another hack—preloading. We’d hide the hover-state images in a 1x1 pixel div at the bottom of the page, forcing them into the browser's cache. It was crude asset management, but it worked.

The Durable Pattern That Actually Won

It's important to be intellectually honest about this era. While we were hacking tables and coordinates together, another discipline was emerging. The web standards movement, championed by practitioners like Jeffrey Zeldman, argued that these techniques were a harmful dead end. They were right. The truly durable architectural pattern that won was the separation of concerns: HTML for semantic structure, CSS for presentation. That principle of decoupling content from its appearance is what ultimately scaled, providing the foundation for the responsive, accessible web we have today. The clever hack was a temporary fix; the robust architecture was the future.

From Image Maps to Agentic Vision

So why look back at these failed patterns? Because the brittleness of an image map provides a perfect mental model for the architectural challenges of modern agentic systems. An image map is a system for extracting structured meaning (a "click on region A") from unstructured data (a pixel at coordinate 123,45). This is a fragile, coordinate-based contract. If you change the underlying image, the map breaks.

Now consider an LLM-based agent tasked with reading a dashboard from a screen capture. When you prompt it with "click the red button labeled 'Submit' in the bottom-right corner," you are effectively creating an image map in natural language. You are coupling your logic to the spatial and visual representation of the UI. If a designer changes that button to blue and moves it to the left, your agent's logic fails completely. The prompt, like the <area> coordinates, is a brittle pointer to an unstructured input. This is the failure mode the demos never show.

SOURCESUser InputsImage & VideoFeedsStructured EventsORCHESTRATION & PROCESSINGDeterministicRouterAgentic VisionSystemData ValidationPipelineState StoreSERVING & OUTPUTSStructured JSONAPI EndpointsMonitoringDashboard
Cooperating Agentic and Deterministic Systems

Concrete Takeaways for Modern Architects

The craft isn't about abandoning powerful but brittle agentic systems. It's about containing their blast radius with durable, deterministic patterns. We learned this the hard way on the early web, and the lessons apply directly to data and AI architecture.

The onMouseOver flicker hack taught us to aggressively manage the asset cache. The modern parallel is pre-warming a serverless container or managing a GPU memory context to cut an agent's first-token latency. The user experience, and the cost curve, depends on anticipating the state change before it happens.

The real solution to the image map problem wasn't a better way to draw coordinates; it was to stop relying on coordinates altogether. We created a semantic layer (the DOM) that decoupled logic from presentation. For modern AI systems, this means relentlessly converting unstructured inputs into structured data as early as possible. Instead of having an agent read a screen, feed it the underlying data via a deterministic API. Compose your clever agentic components with boring, reliable pipelines that don't break when a designer changes a button color. That is the architecture that holds up at 3am.

JC
Juan Cardena
Enterprise Architect, Data & AI

Enterprise architect with 25 years across web, software, data, and AI. MIT CDAO ’25. Writing on agentic AI in production.