Opening an HTML file on a Chromebook
A Chromebook is a browser with a laptop around it, so opening report.html
should be the easiest case there is. Usually it is. When it isn't, you get
one of these:
- Raw markup instead of a page.
- The page opens unstyled — black text, blue links, no images — or
blank.
- "This page has been blocked by your administrator."
- Nothing happens when you double-click.
Each one has a different cause, and only the first is about which app you
used.
Step 1: open it from the Files app
- Download the file. From Gmail, click the download arrow on the
attachment; from Google Drive, right-click → Download. It lands in
My files → Downloads.
- Open the Files app (the launcher, or
Alt + Shift + M).
- Double-click the
.html file. ChromeOS opens it in a Chrome tab
with an address like file:///home/chronos/u-…/MyFiles/Downloads/report.html.
- Opens in a text editor instead? Right-click → Open with → Chrome.
If an editor keeps winning, use Change default in that same menu.
Why the Drive or Gmail preview shows code
Previews are not browsers. Google Drive's web preview and Gmail's
attachment viewer display an .html file as text — on purpose, since
rendering an arbitrary attachment would run its scripts inside Google's
pages. Download first, then open from Files.
Files you open from the Google Drive folder inside the Files app are
streamed on demand. A single self-contained page opens fine from there; a
report that references sibling files is more reliable copied into
My files first.
Step 2: if it opens but looks broken
Unstyled, missing images, or blank: it was never one file
Most tools that produce "an HTML report" produce a folder:
index.html plus css/, js/, data/ and images. Playwright, Allure,
coverage reports (genhtml, coverage.py), Sphinx, Storybook and
nbconvert with external assets all do. Send only the .html and every
reference in it points at a file that isn't on the Chromebook.
If you have the whole folder as a zip, double-click the zip in Files to
mount it, copy the folder out into My files, and open index.html
from the copy. Unlike a phone, ChromeOS gives Chrome a real folder path,
so relative style.css and img/logo.png references then load.
Still blank: it fetches its data
Reports that load data at view time — fetch('data.json'), or an
XMLHttpRequest for results — fail from file:// on every computer, not
just Chromebooks. A local file has an opaque origin, and Chrome refuses
the request. The console says something like
Access to fetch … from origin 'null' has been blocked by CORS policy.
See CORS error: origin 'null' and
the same-origin policy.
Opens, but tiny or wide
That's the page's layout, not the Chromebook. Use Ctrl + - / Ctrl +
+ to zoom, or check the page with the free
mobile-friendly test if it's meant for
small screens too.
School and work Chromebooks: blocked by your administrator
Chromebooks enrolled by a school or company are managed through the Google
Admin console. Admins commonly block file:// URLs, block downloads of
certain types, or restrict which apps can open files. The result is the
grey "This page has been blocked by your administrator" page, or a
double-click that does nothing.
There is no setting you can change on the device, and you shouldn't try to
work around it. What does work: open the report as a website. A link
to an https:// page is just browsing, so it opens wherever the web is
allowed.
What about Linux and Android apps?
If you use the Linux development environment, files under Linux files
live inside a container. Copy the report to My files before opening it
in Chrome — paths inside the container aren't ones the browser can reach
by default. Android "HTML viewer" apps from the Play Store mostly show
source or a stripped-down render; Chrome is the better viewer on a
Chromebook.
The fix that always works: a URL
Every failure above comes from opening a file. So send a link.
Whoever has the report drags the file — or the whole output folder, or a
zip — into Comma and shares the URL:
index.html becomes the report, its assets upload alongside it, and
relative references are rewritten to the uploaded copies — the CSS,
images and data come with it.
- Scripts run in a sandboxed iframe, so sortable tables, charts and
expandable failures stay interactive.
- It opens in Chrome on a Chromebook — managed or not — like any other
page. No download, no Files app, no Open with.
- Readers can leave comments pinned to the exact line they mean.
Need it to stay a file? The free HTML inliner folds
a report folder into one self-contained .html with CSS, JavaScript,
images and fetched data files embedded. That file survives being attached
and opens from the Files app — unless an admin policy blocks local files,
in which case only the link will do.
Is it safe to open?
An .html file can contain scripts, and opening it in Chrome runs them.
Treat it like any attachment: only from senders you trust. Comma renders
report HTML in a sandboxed iframe with no same-origin access, so a script
in a report can't reach your session, cookies or storage — a containment
boundary, not a malware scanner.
Try it
Comma is free — unlimited reports, unlimited commenters, unlimited
revision history. Reading a shared link needs no account.
Turn the file into a link →
Related