How to upload multiple files with JavaScript and PHP

Adding multiple file elements for uploading multiple files is time-consuming and you need to write some extra code for this.

You can do it with a single file element by enabling multiple file selection.

Read the selected files and append in the FormData object for passing to the AJAX file for upload.

In this tutorial, I show how you can upload multiple files with JavaScript and PHP.

How to upload multiple files with JavaScript and PHP

Read more

How to upload file with JavaScript and PHP

File uploading is a basic requirement in a website. It is done using a server-side script.

Requires to reload the page after form submission to execute the script.

With AJAX client-side script is interact with the server-side script and performs the action without page reload.

In this tutorial, I show how you can upload a file using JavaScript AJAX, and PHP.

How to upload file with JavaScript and PHP

Read more

How to send GET and POST AJAX request with JavaScript

AJAX is the only way that allows communicating client-side with the server-side.

It is easier to send AJAX requests using JavaScript libraries or frameworks. But it is also good to know how to send AJAX request with plain Javascript.

Use the XMLHttpRequest object to communicate with the server.

In this tutorial, I show how you can send GET and POST AJAX requests with JavaScript and handle the request with PHP.

How to send GET and POST AJAX request with JavaScript

Read more

Pitch volume Detection in Speech Recognition – JavaScript

Web Speech API allows recording human voice and convert it to text or generate an audio file.

This can be used to enable the users to access the website hand-free and give commands with voice.

Sometimes, requires to detect the user voice volume.

To do this I am using volume-meter.js library.

It returns pitch volume.

Use this value to draw a graphical representation.

Pitch volume Detection in Speech Recognition - JavaScript

Read more

How to prevent Browser from caching JavaScript file

Sometimes, JavaScript modification doesn’t reflect on the page while running the need to clear browser cache manually each time when the file gets updated.

It makes the debugging process hard.

If the project contains some bug and you fix it but the user needs to clear the browser cache to reflect the changes.

In this tutorial, I show how you can prevent JavaScript file from Caching by the browser.

How to prevent Browser from caching JavaScript file

Read more