The HTML tag

Last week I was debugging a website that had already been developed. I moved the site to a test server but nothing was working correctly. I had no clue what was happening.

Enter the base tag. Never seen it. Never heard of it. Didn’t even know about it. If you are interested, read the official documentation. In a nutshell, it “specifies an absolute URI that acts as the base URI for resolving relative URIs”.

I will never use it. It seems to be handy if you are manually editing your site and you happen to move everything to a new server. In this case, all you would have to do is modify the base tag. Simple. Your links would still work as expected. But in anything that I have ever worked on, I simply update a database field or a config file and everything is good. Links are updated.

Here are some good links with some additional info regarding the base tag:

Tags: , ,

Post a Comment

Your email is never published nor shared.