As the name suggests, a meta refresh is an instruction to a web browser to refresh the content of any given web page, after a pre-specified time interval. You will see it in the <head> tag of webpages, written like this.
The content parameter here displays the time till refresh in seconds. So if a site has a meta refresh used, you’ll see the page refresh 10 seconds after entry just as if you had pressed the F5 key.
This can also be used to fetch a different URL if needed, after the given time.
So by setting the time to ‘0’ in the content parameter, the page would redirect to the previously agreed page instantly. It’s another way of doing a redirect without returning the corresponding header status.
When to use meta refresh
Normally, you would probably want to use a 301 redirect to point users to a different page. However, you might not have server side access – so this is a quick fix.
On the whole, using meta refresh in place of 301 redirects is discouraged for the sake of best practice. However, in instances where outdated content is being served or content is dynamic and needs updating (such as news pages live tweeting events and the like), a meta refresh is often used.
It’s a user-friendly way of pointing users to a new page in some cases, as shown below.
Bear in mind though, that some users might be a bit annoyed that they don’t get the choice to navigate on their own.
Meta refresh used to be a pretty viable blackhat SEO tactic, but I haven’t seen much proof of it still being able to manipulate search results today. The page presented to search engines would be utterly stuffed with keywords, but the meta refresh could turn the user to the ‘user friendly’ version of a page without using a 301. This is sneaky but I still enjoy seeing it when I come across it. It goes without saying that you shouldn’t do it for any of your clients though, as Google’s Quality Guidelines don’t like it.
Preventing Cacheing with a Metatag
If your webpage is the type that you would prefer to update for a user every time it is visited, you can prevent them from seeing an older version of the page by blocking it from being cached on their device.
This is another HTML meta tag.
Simply, this means that every time a user loads the page, it will be downloaded from fresh. So any changes you have made in the meantime will be visible to the user.
It’s worth noting that this will mean all http requests to the server are required every time the page is loaded, meaning if it’s a slow page to load it will continue to be slow even if the user has visited it before.
You just need to place these tags within the <head> of your pages for them to work.