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

Angular's new httpResource and a bonus hidden feature

  The first   release candidate   for   Angular 19.2   is out, and it includes the new experimental   httpResource . This is essentially a s...

Best for you