🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

first-html

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

first-html

A minimal CLI utility that outputs the first packet (1500 bytes) of HTML for a given URL. Use this tool to optimise loading of critical assets within your site.

0.0.1
latest
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

First HTML

github: @isAdrisal/first-html

Overview

A minimal CLI utility that outputs the first packet (1500 bytes) of HTML for a given URL. Use this tool to optimise loading of critical assets within your site.

Inspired by this discussion.

HTML is a streaming standard, which means browsers can begin parsing HTML content before the entire file has been downloaded. When optimising a web page for performance, moving critical resource declarations further up the document can result in earlier parsing, download and execution of those resources.

This tool provides an easy way to identify what content is included in the very first chunk of HTML (first 1500 bytes) received by the browser. Both gzip and brotli compression are supported, as well as pages served in plain-text.

Getting Started

Installation

Install the package with npm:

npm i first-html -g

Usage

first-html "https://foo.bar"

This will examine the provided URL and save the output as a timestamped .html file in the current directory.

Arguments:

ArgumentDescription
URLAbsolute URL (including https://) of the page (REQUIRED)
Wrap URL in quotes, eg. "https://foo.bar"
--outdirOutput directory of the exported file (OPTIONAL)
Defaults to current directory.
first-html "https://foo.bar" --outdir ./output

Keywords

html

FAQs

Package last updated on 01 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts