What is meta http-equiv refresh

The meta tag with the http-equiv="refresh" attribute is used in HTML to instruct the browser to automatically refresh or redirect a webpage after a specified amount of time. It essentially acts as a meta-refresh mechanism.

Here’s how it works:

html

<meta http-equiv="refresh" content="30">

In this example, the page will automatically refresh every 30 seconds. You can also use this tag for redirection:

html
<meta http-equiv="refresh" content="5; url=https://www.example.com">

In this case, the page will redirect to https://www.example.com after 5 seconds.

The meta refresh tag is useful for automatically updating content or redirecting users without requiring any user interaction. However, excessive use of automatic refresh or redirection can negatively impact user experience and SEO.

No comments:

Post a Comment

starter ASP.NET Core Web API project with example

Starter ASP.NET Core Web API project that follows all the best practices listed above. 🛠️ Starter Project Overview We’ll build a Produc...

Best for you