0

Example A:

<div id="content-box">
    <div class="content-box-inner">
    Title
        <br/>
        <a href="www.google.com"><div class="cb-item"><img src="http://www.hellothere.com/images/image.jpg"/> Hello There</div></a>
    </div>
</div>

Example B:

<div id="content-box">
    <div class="content-box-inner">
    Title
        <br/>
        <a href="www.google.com"><div class="cb-item"><img src="/images/image.jpg"/> Hello There</div></a>
    </div>
</div>

Is either way specifically better? Does using only /images make the page load faster? is having the entire link better for SEO?

Thank you in advance!

Steve
  • 111
  • 2
  • 6

2 Answers2

2

It is better to use relative addressing (your Example B), because you can more easily move your site from dev to test to production servers without having to find and change a bunch of links.

Always use relative addressing ... you never know when you will need to change the website prefix!

ErstwhileIII
  • 4,829
  • 2
  • 23
  • 37
0

It's smart to use Example B if you are writing a big code. But it does not makes the page load slower if you are using Example A Also if you move you website it keeps finding the image!

EDIT:

Also; you have to use <a href="http://www.google.com">Link</a> to make it work. Else it sends you to yourwebsite.com/www.google.com