DevTools: Watching an App Talk
Vera opens Tandem's own web map — the one riders use to find bikes — and does something she has never done in twenty years of using browsers: she presses F12. A panel unfolds. She clicks the tab labelled Network, refreshes the page, and there they are: every request the map just made, listed like an itemized phone bill. The API was in front of her the whole time. Now she can watch it.
This panel is DevTools — the developer tools built into every modern browser, free, already installed, and despite the name, not just for developers. The Network tab is a read-only window onto your own browser's conversations, and learning to open it is the single biggest jump in seeing-power this book has to offer.
Opening the Panel
Three ways in: press F12 (on a Mac, Cmd + Option + I), or right-click the page and choose Inspect, or hunt through the browser menu for "developer tools." (Safari keeps its tools hidden until you tick Settings → Advanced → "Show features for web developers" once.) Click the Network tab in the panel that appears. One important habit: the tab records from the moment it is open, so refresh the page after opening it — that way you capture the conversation from the start. Each row that appears is one request: its address, its verdict, its size, its timing.
Finding the Interesting Rows
A busy page makes dozens of requests, most of them fetching images, fonts, and styling — legitimate traffic, but not what you came for. The Network tab has filters for exactly this: click Fetch/XHR — Chrome's label for the calls page code makes to fetch data; Firefox labels the same filter XHR — and the noise drops away. What remains is the API traffic. There, in Vera's filtered list: GET /v1/stations, verdict 200, right where Chapter 2 said it would be.
Reading One Conversation End to End
Click any row and the panel opens the whole exchange: the request headers your browser sent, the response headers the server answered with, and the response body — the JSON itself, prettified. Everything from Chapter 2, live, on a real conversation your own browser just had. Notice things you now recognize on sight: the Content-Type, the status code, the request's method. Nothing in this panel is new; the panel is where what you learned becomes visible.
A Professional Habit, Acquired
This is how developers, testers, and support people answer the question "what is this app actually doing?" — not by guessing, but by watching. It is a habit worth stealing early, and it is honest work: the Network tab shows your side of the conversation — the traffic your machine sends and receives. Tandem's servers, their databases, their internals: still behind the counter, where they belong. One more thing worth saying plainly: among what you can see is everything your browser sends on your behalf — which will matter in Chapter 5, when what it sends includes a key. The testers' version of this habit, systematized, lives in its own course: QA & Software Testing for Beginners, Chapter 8.
- "DevTools is a programmer tool — I might break the site." The Network tab is a read-only window on your own browser's traffic. Closing it undoes nothing, because it did nothing. Watching is all it does.
- "This shows Tandem's secret internals." It shows your half of the conversation — exactly what your machine sent and received. The server's inner workings never appear, because they never crossed the wire.
- "All those font and image requests mean something is wrong." A page assembling itself is dozens of requests — that is normal. The Fetch/XHR filter exists precisely to find the API calls among them.
- "If I can see my own credentials here, so can other people." The panel shows your browser's traffic to you, on your machine. It becomes a leak only if you screenshot it and share — which is Chapter 5's warning, previewed.
- Every "what is this thing loading?" question at work is now answerable in a few keystrokes. That is a genuine professional capability, acquired in one page.
- Watching the app use the API demolishes the last of the mystery: same door, same requests, same answers you have been reading for two chapters. You have now seen the door swing.
Knowledge Check
What does the Network tab actually show?
- The inner workings of the server, including its databases, its code, and its configuration
- Every request your own browser makes, with its verdict, size, and full contents
- The requests that all users of the website are currently making
- A security scan that rates each of the requests as safe or dangerous
Why refresh the page right after opening the Network tab?
- Because the panel does not start working until the page reloads once
- Because the tab records from the moment it opens, and the refresh replays everything
- Because opening DevTools interrupts the page's scripts, and it has to be restored with a reload
- Because cached pages do not make any real requests until they are refreshed twice
What does the Fetch/XHR filter isolate?
- The requests that failed and need your attention before the page will work properly
- The images and fonts, which are the largest downloads on the page
- The requests that the page's own code makes when it fetches data
- The requests that were sent without any encryption and might therefore be unsafe
You got correct