How to Hide HTTP Requests in Cypress Command Logs
Hide XHR and Fetch entries in Cypress Command Logs with the App toggle or cy.intercept(). Learn what each option changes and how to troubleshoot it.
To hide browser XHR and Fetch entries in Cypress 15.4 or later, open a test in the Cypress App, select Options in the Command Log header, and deselect Show HTTP Requests. This changes what the Command Log displays; requests still run and remain available to cy.intercept().
For code-level control, define an intercept with log: false. Use the App toggle when you only want a cleaner view, and an intercept when you want logging behavior configured in the test. These controls do not block requests.
1. Hide requests in the Cypress App
- Open the project and run the spec in the Cypress App.
- In the Command Log header, open Options.
- Deselect Show HTTP Requests.
The toggle is available in Cypress 15.4 and later. It hides displayed XHR and Fetch entries without changing test execution. You can still use cy.intercept() to spy on or stub requests.
This is a display preference, not a network setting. It does not prevent the browser from sending requests, stop a request after it starts, or remove the request from the application’s behavior.
2. Suppress application request logs in test code
Cypress documents a catch-all intercept pattern that sets log: false for matched XHR and Fetch traffic:
cy.intercept({ resourceType: /xhr|fetch/ }, { log: false })
Put the intercept before the action that causes the requests. For example:
describe('checkout', () => {
it('keeps the Command Log focused on user actions', () => {
cy.intercept({ resourceType: /xhr|fetch/ }, { log: false })
cy.visit('/checkout')
cy.get('[data-testid="continue"]').click()
cy.get('[data-testid="confirmation"]').should('be.visible')
})
})
Version caveat: Cypress’s API reference marks resourceType deprecated since Cypress 14. Check the current cy.intercept() API reference and your installed Cypress version before adopting this matcher in new tests. The documented example remains useful for understanding the logging option, but the deprecated property may not be the right long-term matcher for your project.
Logging control is configured when the intercept is defined. Cypress does not document setting this option from inside a route handler callback. If you need to suppress logs only for a specific endpoint, define a route matcher for that endpoint and set log: false on that intercept rather than applying a broad catch-all.
3. Hide the log for a specific stub
For a route that you stub with a static response, include log: false in the response object:
cy.intercept('GET', '/api/products', {
statusCode: 200,
body: [{ id: 1, name: 'Example product' }],
log: false,
}).as('getProducts')
cy.visit('/products')
cy.wait('@getProducts')
cy.get('[data-testid="product-name"]').should('contain', 'Example product')
The alias and cy.wait() still let the test synchronize with the request. Hiding its default log entry does not remove the stub or stop the request from being matched. See Cypress’s network requests guide for the static response pattern.
4. Hide a cy.request() command entry
cy.request() has its own log option, which defaults to true. Set it to false in the command options to hide that command’s entry:
cy.request({
method: 'GET',
url: '/api/health',
log: false,
}).its('status').should('eq', 200)
This is different from hiding browser-originated XHR and Fetch entries. Cypress issues cy.request() from its Node process, outside the browser proxy used by cy.intercept(). Use the cy.request() option for its command entry; use the App toggle or an intercept for application traffic. See the cy.request() API reference.
5. Choose the right logging control
| What you want | Use | Scope and notes |
|---|---|---|
| Declutter the visible log while debugging | App Options → deselect Show HTTP Requests | Cypress 15.4+; display-only and does not change test execution. |
| Suppress default logs for matched application requests in code | cy.intercept(matcher, { log: false }) |
Configured at intercept definition. The documented resourceType matcher is deprecated since Cypress 14. |
| Hide a particular static stub’s log | Set log: false in the static response |
Applies to that route definition. |
Hide a cy.request() command |
Set log: false in its options |
Separate from browser XHR and Fetch traffic. |
6. Troubleshoot requests that still appear
The Show HTTP Requests option is missing
Cause: The project may be using a Cypress version before 15.4, or you may not be looking at the Command Log header’s Options menu in the App.
Fix: Check the installed version and open a running test in the Cypress App. The documented App toggle starts with Cypress 15.4.
The request still runs after hiding it
Cause: The App option hides the displayed entry; it does not disable network traffic.
Fix: If the goal is to control the response, stub or spy on the route with cy.intercept(). If the goal is only a cleaner log, the continuing request is expected.
Some XHR or Fetch entries remain with an intercept
Cause: The intercept may be registered after the request, its matcher may not match the request, or the installed Cypress version may handle a deprecated matcher differently.
Fix: Register the intercept before visiting or triggering the page action. Check the route and method matcher against the actual request, and consult the current intercept API reference for supported matcher properties.
A cy.request() entry remains
Cause: Browser traffic logging controls do not configure the separate cy.request() command entry.
Fix: Pass log: false in that call’s options object.
An intercept log option inside a callback has no effect
Cause: Cypress documents logging behavior as an intercept definition option, not a setting to add later from inside the callback.
Fix: Configure log: false when defining the intercept or static response.
7. Performance, reliability, and cost
These settings are for Command Log visibility. The App toggle does not change request execution, so it is not a performance optimization or a way to reduce network traffic. Likewise, suppressing a log entry does not by itself make a test more reliable; keep assertions, aliases, and waits that verify the behavior you care about.
There are no additional Cypress charges or runtime cost claims associated with hiding these entries in the cited documentation. If test failures become harder to diagnose after suppressing logs, use the App visibility toggle while investigating or narrow the code-level intercept to only the noisy routes.
8. Or skip the browser setup
If your task is to capture a page image rather than debug Cypress’s test log, ScreenshotNeo is a website screenshot API and MCP server. One GET request returns a PNG, JPEG, WebP, or PDF. See the API documentation for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', res);
- Cookie banners and consent overlays are handled before capture; ScreenshotNeo also removes supported newsletter popups and chat widgets. Each cleanup step can be turned off.
- Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed; response headers report the page verdict and billing status.
- An MCP server gives AI agents tools to take screenshots, inspect page information, and capture PDFs.
- The Free plan includes 1,000 screenshots a month with no card. Paid plans start at $5 for 3,000 screenshots.
Start free with 1,000 screenshots a month and no card.
9. FAQ
Does hiding HTTP requests disable cy.intercept()?
No. The Cypress App visibility option hides displayed entries; Cypress says requests continue to run and remain available to cy.intercept().
Can I hide only one endpoint?
Define an intercept for that endpoint and configure its logging option there. Check matcher compatibility with your installed Cypress version, especially if using the deprecated resourceType property.
Does cy.request() go through the browser network proxy?
No. Cypress documents that cy.request() runs from its Node process, so its command log option is separate from browser-originated XHR and Fetch logging.


