Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML base tag #166

Closed
bertrand-caron opened this issue Feb 3, 2015 · 5 comments · Fixed by #358
Closed

HTML base tag #166

bertrand-caron opened this issue Feb 3, 2015 · 5 comments · Fixed by #358

Comments

@bertrand-caron
Copy link

Hi,

I have not yet come up with a test for it, but I have the feeling html-proofer does not implement the HTML base tag.

I myself only discovered the existence of the tag recently, which is really useful for not hardcoding too much in your site's URL.

Do you want to comment on that ?

Cheers, B.

@gjtorikian
Copy link
Owner

Wow, that's new to me too. No, Proofer doesn't handle this yet...but it should.

@doktorbro
Copy link

The base tag is not widely used. Bertrand, can you provide a public website made by you with the base tag?

@bertrand-caron
Copy link
Author

Hi Anatole,

I am using for a corporate website that I would not like to advertise here, but basically any website that is sitting in a subdirectory could use the <base> tag to avoid hardcodding this subdirectory path anywhere else than on the base tag.

For instance if you are building a blog on your domain name 'http://hello.me/blog/2010-03-10-my-blog-post.html', I think you are better off setting <base href='http://hello.me/blog/'> and referencing your links as <a href='2010-03-10-my-blog-post.htm'.

Am I making sense ?

Regardless of that, shouldn't the fact that it exists in the standard be enough to make its implementation worthwhile ?

PS : Of course, I would have used subdomains if I could.

@doktorbro
Copy link

@bertrand-caron Do you know another corporate website which uses the base tag?

The base tag is not popular because it’s prepended to every relative link. If for example my assets sit in the uploads top-level directory, the base tag is not really helpful.

Regardless of that, shouldn't the fact that it exists in the standard be enough to make its implementation worthwhile ?

Not necessarily. Proofer is not an academic project, it focuses on real-world issues.

@lurch
Copy link

lurch commented Sep 28, 2016

Do you know another corporate website which uses the base tag?

We use the base tag on e.g. http://www.interballoon.com/cgi-bin/order.pl and http://www.interrose.co.uk/flowers/20_pink_freesias.shtml as it allows us to keep using relative links to the files in the root directory, even though the current page is being served from a subdirectory. It means the page in the subdirectory doesn't have to get cluttered with '../' everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants