Chris
Chris

Reputation: 11

How to refresh a home page or go to the home page with one link?

Alright so here's my dilemma, I have a refresh link on my blog that refreshes the current page you're on. I want the link to, if you're on the homepage (/) to refresh and if you're on a different page, say /tagged/me to go to the homepage / the current html I have for the links section is:

<div id="linkz">
     <a href="javascript:history.go(0)" title ="refresh">refresh</a> 
   - <a href="/fask" title="fask">fask</a>
   - <a href="/tagged/me" title="face">face</a> 
   - <a href="/more" title="more">more</a></div>

p.s. my blog is here and the links are in the sidebar.

Upvotes: 0

Views: 627

Answers (2)

Elmer
Elmer

Reputation: 259

if you simply want the link to refresh to the homepage, why not just href it to the homepage? Just make it href="/".

Upvotes: 0

adnrw
adnrw

Reputation: 1040

I'm not exactly sure if this is what your question is asking but if you want to go to the home page, just set the link to

<a href="/" title="Home Page">Home Page</a>

On every single page. No need for Javascript, just straight up HTML.

Upvotes: 2

Related Questions