Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles by Shubham Vora
Page 48 of 80
Why split the <script> tag when writing it with document.write()?
In this tutorial, we will learn why to split the tag when writing it with the document.write(). The script tag in HTML is added to execute JavaScript code on the webpage. The JavaScript programs must be enclosed with the script tag to execute. There are many methods in JavaScript that add HTML content to the page, like the document.write() method. The document.write() method is used to delete all the content from the HTML tag or the document and add the content specified in this method to the page. Because of performance degradation and errors in certain conditions, this method ...
Read MorePOST unchecked HTML checkboxes
In this tutorial, we will learn to POST unchecked HTML checkboxes. To interact with a user, it is necessary to take their input or data through the website. The HTML forms are used to take input from the user. Forms are essential to take the data of the user on the website. These forms take input from the user and send data to the server using HTTP requests. There are two types of HTTP requests one is GET, and the other is POST. The POST request is the most used type because it is secure and can send a large ...
Read MoreWhat are Max parallel HTTP connections in a browser?
In this tutorial, we will learn about Max parallel HTTP connections in a browser. To know more about this topic, we will first understand what parallel connections are, the reasons behind blocking and how to solve it, and the browser limitations. Parallel Connections By entirely requesting the original HTML page, the first embedded item, the second embedded object, etc., a browser may naively process each embedded object in sequence. But it moves too slowly! HTTP enables clients to establish connections and parallelly carry out numerous HTTP transactions. Parallel Connections Could Speed Up Page Loading. If composite pages with embedded objects ...
Read MoreIs it possible to write data to file using only JavaScript?
In this tutorial, we will learn if it is possible to write data to files using only JavaScript. JavaScript has a library named fs (short form of File-System) that manages all writing operations. It is a JavaScript program (fs.js) with functions for writing operations. Utilize functions to write text to system files by importing the fs module into the program. For example, the writeFile() function will erase all old data from a file and create a new one with the specified name if there isn’t already one. It is mainly used for writing operations. The File-System module is a handy ...
Read MoreHow to store objects in HTML5 localStorage?
In this tutorial, we will discuss how to store objects in HTML5 localStorage. We can access the Storage object and store data in it thanks to the interface window's localStorage property. There is no time limit on it. As a result, the data that is stored in it will remain until it is explicitly deleted. The localStorage data can't be removed by closing the browser. To store JavaScript objects in localStorage, we will investigate how to stringify and parse them into JSON strings and then how to store them in localStorage. Using the setItem() Method This setItem() method is used ...
Read MoreHow to Access the Correct “this” Inside a Callback?
In this tutorial, we will learn about how to Access the Correct “this” inside a callback. “this” keyword Each function contains a keyword called this, also known as “the context, ” whose value is determined by how the function was called and not by how, when, or where it was defined. Unlike other variables, it is unaffected by lexical scopes. Compared to other languages, JavaScript acts a little differently when a function’s “this” keyword is used. Between strict mode and non-strict mode, there are several further changes. How a function is called most often determines the value of “this” (runtime ...
Read MoreHow Does the Access-Control-Allow-Origin Header Work?
In this tutorial, we will learn how access control allows the origin header to work. Access-Control-Allow- Origin is a header for CORS. With CORS or cross-origin resource sharing, browsers can permit a website hosted at origin A to request resources from origin B. Origin is a mix of port, hostname, and scheme, such as http://tutorialspoint.example.com:5000/, rather than just the hostname. Here is an illustration of how this is put into practice − I want to obtain resources from origin B, which is http://yoursite.com, and origin A:https://www.tutorialspoint.com. ...
Read MoreDifference between an Absolute URL and a Relative URL
In this tutorial, we will learn the difference between an absolute URL and a relative URL. What is a URL? A Uniform Resource Locator (URL) is an address that indicates the location of a specific file or resource on the World Wide Web (WWW). A URL specifies the site of a target saved on a local or networked computer. A file, directory, HTML page, image, application, and more can all be the target. The organization of your website’s URL and internal links is crucial to how well it works. This is crucial to ensuring that your website can be successfully ...
Read MoreHow to add HTML and CSS to PDF?
In this tutorial, we will learn how we can add HTML and CSS to PDF. The HTML and CSS construct the webpages with styles and designs. We can save that webpage as a PDF file. Creating a PDF from scratch using vanilla JavaScript makes it very difficult, and the code will be lengthy. There are many libraries created upon JavaScript that will helps us to execute our task. The libraries like html2pdf, jsPDF, etc. are well-known libraries that convert webpages into pdf. These libraries can be implemented in the project using the script we are adding to the program. So, ...
Read MoreWhy is using onClick() in HTML a bad practice?
In this tutorial, we will learn why using onClick() in HTML is a bad practice. There are events and methods in JavaScript to handle the actions like clicking, hovering, etc. The onClick() is the most used method that executes a function on clicking an element. This method is applied to the element as its attribute. It may contain the name of the function or the script itself. JavaScript also contains the addEventListener method used to execute a function on the occurrence of an event. There are many ways to execute events, and every way has advantages and disadvantages. ...
Read More