Skip to main content

Command Palette

Search for a command to run...

How Can we auto refresh website using HTML. Is it possible?

Published
β€’3 min read
How Can we auto refresh website using HTML. Is it possible?

Hey Fellas Hello Again πŸ‘‹ ,

So, here I am with a random tutorial on HTML Let's see what problem we got today Ooooo... I see you want to refresh your website in every 5 or 10 seconds and don't know JavaScript or don't want to use JavaScript that's why here I am let's see how we can do this same thing with HTML.

Let's Go fellas.......

For this first we need to see what are meta tags and if you already know these then congratulations you are a Super-human.

Overview of meta Tag

1.) What is meta tag.

meta tag is basically used at top of the HTML or you can say between the head section something like example shown below πŸ‘‡

<html>

    <head>
        <meta bla bla > // here goes meta tag // we will also discuss this bla bla 
    </head>

    <body>
        something something here to show off
    </body>
</html>

2.) Why we use the meta tag in HTML.

So, why we use meta tag on HTML is a obvious question I mean why we should use it, It doesn't even appear on screen but Now, here comes Search Engine Optimization or the role of Search engine like Google, Bing, DuckDuckGo and so on.

The meta tag is basically created for these search engine to increase the reach of a website.

For instance If you are searching for a travel website how will google show you those website if even google do not know which is travel website because google have billions of data and then the google algorithm looks for those handsome meta tags to help you and himself.

check the example below πŸ‘‡

<html>

    <head>
       <meta name="description" content="99% off on travel plans"> // here bla bla replaced by these name and content  
    </head>

    <body>
        something something here to show off
    </body>
</html>

So, the πŸ‘† above πŸ‘† is an overview explanation of meta tag.

Auto refresh using meta tag

Now, you got an overview of meta tag so it's time to see how we can use this tag to auto refresh the web page with a specific time.

meta tag uses another attributes called "http-equiv" and then set its value "refresh" it will basically refresh your website but you also need to give a duration. Now, to give duration to web page you need to give another Attribute "content" and the value you define in this attribute in numbers will be in seconds. which is the duration after how many seconds your website should refresh.

like this πŸ‘‡

<meta http-equiv="refresh" content="5" // website refresh after every 5 second >

and BOOM.......here you go boi we both done it so be proud of yourself bro.

So, now it's my time to leave do some tweaks with this and have fun

Adios Amigo πŸ‘‹