Category: FAQs

Recent Post

Get Size of a FormData Object Payload

To do so, you need to make your calculations conditional upon data type.

Validate File Size Before Upload with JavaScript

Minimize server requests by validating file size before uploading.

Show Desktop Notifications with JavaScript in the Browser

Using the Notificaitons API, you can send system-level notifications to a user.

Input Form Field Suggestions with HTML and JavaScript

Input suggestions can be coded with HTML only and options populated with JavaScript.

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.

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.