> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenoci.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Web in Safari

> box web opens a page in Safari on a Mac and on an iPhone simulator and saves both screens

> [!NOTE]
>
> **When to use it.** You build a web app and want to see it in Safari, on a Mac and on an iPhone, without owning either. One job opens the page in both and brings back two pictures with the page errors and failed requests

## Run it

```bash theme={"system"}
box web https://example.com
```

<video controls muted loop playsInline autoPlay preload="metadata" poster="/media/docs/ios-web-poster.webp" src="https://mintcdn.com/xenoci/ZFKGlbE4Q2bw14Om/media/docs/ios-web.mp4?fit=max&auto=format&n=ZFKGlbE4Q2bw14Om&q=85&s=8182d891784f5f8b7b189557310651e5" width="1280" height="778" />

box web opening a page in Safari and saving its screenshot

```text theme={"system"}
box: queue: job bj_GPIQBJRaG9yUE0PL (web, ios, $0.05/min) submitted
box: status: succeeded
box: results: saved to ./.box/out/bj_GPIQBJRaG9yUE0PL/ (safari-ios.png, safari-mac.png, web.json)
Safari (Mac): "Example Domain" safari-mac.png, 0 error(s), 0 failed request(s)
Safari (iPhone simulator): "" safari-ios.png, 0 error(s), 0 failed request(s)
box: bj_GPIQBJRaG9yUE0PL succeeded, 120s billed, $0.10
```

![example.com in Safari on a Mac, as box saved it](https://mintcdn.com/xenoci/ZFKGlbE4Q2bw14Om/images/docs-feature-web-mac.png?fit=max\&auto=format\&n=ZFKGlbE4Q2bw14Om\&q=85\&s=43001377fab0d2f86d36f40cb110bfde)

![example.com in Safari on an iPhone simulator, as box saved it](https://mintcdn.com/xenoci/ZFKGlbE4Q2bw14Om/images/docs-feature-web-ios.png?fit=max\&auto=format\&n=ZFKGlbE4Q2bw14Om\&q=85\&s=2beeb651d4bf0300158fc3cb419e7a62)

Safari on the Mac, then Safari on the iPhone simulator, made smaller for this page. `web.json` lists the errors, the failed requests and the load times

## Options

* `--serve "npm run dev" --port 3000` uploads this folder and starts your dev server on the Mac first, then opens the path you give (default `/`)
* `--width` sets the Mac window width (default 1280), `--dark` the iPhone appearance, `--device` the simulator
* `--wait-for "#app"` waits for a CSS selector before the pictures


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.