Browser Check Compatibility Via Command Lines

August 24, 2022 0 Comments

The creation of a website traditionally involves a variety of technologies that can work in all major browsers, some of them partially or not at all. Web developers nowadays would always refer to CanIUse to check if a particular feature is supported in a browser or one of its many versions.

CanIUse tracks the browser’s adoption of Standard HTML, CSS and SVG, as well as their references, the status of the W3C specifications and links to the problems and errors that occur in each browser. For example, we can see below that Edge, Firefox and Opera Mini do not support CSS reflection, and in browsers where it is supported, the manufacturer’s prefix is required. CanIUse is the de facto tool that records to what extent the Standard Web specifications are compatible in desktop and Mobile browsers.

Outside of the browser version by CanIUse is now available as a command line interface (CLI). We are also able to obtain the resulting CanIUse via the Terminal or Command prompt. If you frequently stumble over the Terminal, the command line interface would effectively streamline your workflow.

Safety requirements

To deploy the CanIUse command line, you must first install NodeJS and NPM.

If npm-v or node-v returns the version number (as shown below), you can deploy the CLI. Otherwise, if the error “command not found” is returned, download the NodeJS installer here. The installer is available for Windows, OS X and Linux. Select the operating system you are using.


The installation of the CanIUse CLI is only one line away. Open the Terminal or Command Prompt and run the following command.
This command installs the CLI globally so that it is accessible throughout the operating system location. After Installation, you should now have the caniuse command line at your disposal. There is no rule to “search” via the CLI. Just search naturally as in the web version, for example when you run “caniuse box shadow”, the CSS3 Box Shadow specification is returned.

Note that we don’t need to leave the space for the keyword query, which we traditionally should do. Basically, the results of the command line interface correspond to the web version. Even if a search is performed with an incomplete keyword, such as soc or sock, the search with Web Socket appears at the top, followed by relevant entries.

CanIUse is a perfect complement to other command-line based tools such as Gulp, Grunt and a versatile handy tool that could possibly improve your workflow. Now you no longer need to leave your Terminal to check the browser compatibility for HTML, CSS and SVG.

Leave a Reply

Your email address will not be published. Required fields are marked *