Year: 2022

Recent Post

Upload Multiple Files using the Fetch API

Learn how for both an input the 'multiple' attribute and with multiple input elements.

Get the size of a file in JavaScript

First get the data in blob or blob-like format and then access its size property.

How to Get the File Extension from a Filename String

You can combine lastIndexOf() and slice() to get the file extension.

Compress an Image File in the Browser with JavaScript

Using the HTML5 Canvas API, you can do image compression on the frontend.

Download Progress with JavaScript’s Fetch Function

Create a download indicator by reading the body of the response.

Set an Expiration Date and Time for a localStorage Item

There is no native expiration option but it can be implemented using timestamps.

Store and Retrieve a Function in localStorage

Pass a function through localStorage using the Function constructor object.

JSON file to CSV download with vanilla JavaScript

Allow your users to download any fetchable JSON file in CSV format.

Social Media Share Buttons with Vanilla JavaScript

Share with vanilla JavaScript by constructing URL requests to social media APIs.

Conditionally load a JavaScript file

By creating a new JavaScript file from scratch or reappend an existing one.