Found 8895 Articles for Front End Technology

How to store a name permanently using HTML5 Local Storage?

Rishi Rathor
Updated on 25-Feb-2020 07:00:54

289 Views

The Local Storage is designed for storage that spans multiple windows and lasts beyond the current session. In particular, Web applications may wish to store megabytes of user data, such as entire user-authored documents or a user's mailbox, on the client side for performance reasons.HTML5 localStorage saves string data in the browser and lasts beyond the current session. localStorage stores the data, with no expiration, whereas sessionStorage is limited to the session only. When the browser is closed, the session is lost.The data won’t get deleted when the browser is closed. Here, we will save the name for example.You can ... Read More

How to set the favicon size in CSS rather than HTML attributes?

Jai Janardhan
Updated on 25-Feb-2020 06:32:28

2K+ Views

A favicon is a little icon visible on the web browser tab, just before the page title. It is generally a logo with the smaller size.You cannot add the size using CSS. The standards do not support adding Favicon size using CSS. Let’s add it using attributes,The result after adding Favicon above will be,

What is the meaning of JavaScript void 0?

Kumar Varma
Updated on 30-Jul-2019 22:30:21

193 Views

The void operator is used to evaluate the given expression. After that, it returns undefined. It obtains the undefined primitive value, using void(0).If inserting an expression into a web page results in unwanted effect, then use JavaScript void to remove it. Adding JavaScript:Void(0), returns the undefined primitive value.The void operator is used to evaluate the given expression. After that, it returns undefined. It obtains the undefined primitive value, using void(0).We used JavaScript:void(0) above to prevent the page from reloading when the button is clicked the first time.It only works when the button will be clicked twice. If it is clicked ... Read More

How to fix problems related to the JavaScript Void 0 Error?

Arjun Thakur
Updated on 16-Jun-2020 08:30:22

1K+ Views

JavaScript void is an error, which can be seen on the web browser. This happened when a user blocks JavaScript coding on the web browser. This gives the void error when an attempt is made to run.The fix is to enable JavaScript. Let us see how to enable it in Firefox web browser −Open Firefox web browser and click Options. After clicking, you will reach the Settings. Here, click the Content tab as shown below −Now, check the box to enable JavaScript. After enabling, click the “Ok” button to save the settings.In newer versions of Firefox, you will get JavaScript ... Read More

How to use window.location to redirect to a different URL?

Jai Janardhan
Updated on 13-Jan-2020 06:26:55

822 Views

You might have encountered a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.It is quite simple to do a page redirect using JavaScript on the client side. To redirect your site visitors to a new page, you just need to add a line in your head section as follows.ExampleYou can try to run the following code to learn how to use window.location to redirect an HTML page. Here, we will redirect to the home pageLive Demo           ... Read More

How to redirect URL to the different website after few seconds?

George John
Updated on 30-Jul-2019 22:30:21

5K+ Views

Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection. To redirect URL to a different website after few seconds, use the META tag, with the content attribute. The attributes set the seconds. The following is an example of redirecting current page to another website in 10 seconds. The content attribute sets the seconds. Example Live Demo HTML Meta Tag Hello HTML5!

How to automatically redirect a Web Page to another URL?

Arushi
Updated on 12-Sep-2023 00:58:59

34K+ Views

Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.To redirect from an HTML page, use the META Tag. With this, use the http-equiv attribute to provide an HTTP header for the value of the content attribute. The value of the content is the number of seconds; you want the page to redirect after.Set the content attribute to 0, if you want the page to load the new URL immediately.ExampleThe following is an example of redirecting current page to another ... Read More

How to use JavaScript to redirect an HTML page?

Rishi Raj
Updated on 07-Oct-2019 08:08:32

2K+ Views

You might have encountered a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection.It is quite simple to do a page redirect using JavaScript on the client side. To redirect your site visitors to a new page, you just need to add a line in your head section as follows.You can try to run the following code to learn how to use JavaScript to redirect an HTML page. Here, we will redirect to the homepageExampleLive Demo             ... Read More

How to redirect from an HTML page?

Yaswanth Varma
Updated on 10-Sep-2023 08:00:03

30K+ Views

Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection. Website designers rely on redirection when there is a need to change the layout of a particular website or the location of a specific page. To redirect from an HTML page, we use the META Tag. Along with this, we also use the http-equiv attribute to provide an HTTP header for the value of the content attribute. The value in the content is the number of seconds; you want ... Read More

Why do we use DOCTYPES in HTML document?

Yaswanth Varma
Updated on 02-Sep-2022 10:55:02

1K+ Views

A DOCTYPE is nothing more than a document type declaration, which is a list of guidelines that must be attached to a certain html, xml, or sgxml online document. Because it is required for the HTML version, if the user application experiences any problems at that time, it can be quickly determined that the problem is due to incompatibility between the HTML version and the user's browser. Formats Of Doctype They are three types Normal Deprecated Legacy Tool Compatible Why Do We Use DOCTYPE? The DOCTYPE is declared before the head section in a HTML document. This ... Read More

Advertisements