org.sonar.l10n.web.rules.Web.S1829.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-web-plugin Show documentation
Show all versions of sonar-web-plugin Show documentation
Analyze HTML (also within PHP/Ruby/etc. templates) and JSP/JSF code.
The newest version!
It is considered best-practice to use relative URLs in web pages to prevent having to update the addresses if the web address in use changes.
Moreover, if some absolute URLs are missed in such a process, it will obviously impact the user experience.
Noncompliant Code Example
<img src="http://www.myserver.com/smiley.gif" alt="Smiley face" height="42" width="42" />
Compliant Solution
<img src="smiley.gif" alt="Smiley face" height="42" width="42" />