User tests: Successful: Unsuccessful:
Pull Request for Issue #22527
Set the correct URL address of the base of website.
This will be the equivalent of JUri::base()
.
The <base>
tag should point to the real path, not to the SEF virtual path.
The <base>
tag can be useful for creating shortened relative links to images, css or scripts.
See at #22527
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
It's because JUri::current()
doesn't return query string. But the idea of using current URL is correct. This is the default behavior when no base tag is specified. So it should be JUri::getInstance()
. Ultimately, base tag could be removed completely.
AFAIK <base>
tag can not have query string.
I don't know the reason of adding the base tag to joomla.
If it was not for security reasons, I would like to remove it at all.
This PR probably will be treated as break B/C.
For everybody who does not like this tag, you can add a simple line of code to remove this tag from your template.
Add the following line somewhere at the top of your template index.php file:
JFactory::getDocument()->setBase('');
AFAIK tag can not have query string.
It can be any valid URL. See https://www.w3.org/TR/html50/document-metadata#the-base-element.
I have read https://stackoverflow.com/questions/1889076/what-are-the-recommendations-for-html-base-tag
If we do as you say @SharkyKZ then <base>
tag will be redundant because the same effect you can get by removing this tag from html at all.
That's the idea.
Would it be better to remove <base>
tag?
The base tag probably should not be the same as URL, take a look at https://audisto.com/help/crawler/features/hints/group/21#h84
I created a second PR, which remove the base tag. I leave the choice to testers and maintainers.
The base tag probably should not be the same as URL, take a look at https://audisto.com/help/crawler/features/hints/group/21#h84
It's only saying that the tag is redundant when it points to current URL. Which isn't true considering srcdoc
usage. Probably not important in our case, just something to keep in mind.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-10-17 21:05:54 |
Closed_By | ⇒ | csthomas | |
Labels |
Added:
?
|
This breaks anchors.