Posted By

BlueIceStudios on 01/18/11


Tagged

jquery referrer backlink


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

virendrakryadav
jondiscipulo
Balamir


jQuery Referrer Back Link


 / Published in: jQuery
 

URL: http://www.codespuds.com/jquery-referrer-back-link/

  1. //jquery
  2. var hist = document.referrer;
  3. 4.$("#hist").append('<a href="'+hist+'">Go Back</a>');
  4.  
  5.  
  6. //html
  7. <div id="hist"></div>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: kendsnyder on January 18, 2011

Beware: document.referrer is not always set. If it is not set, you may want to add an alternate link.

You need to login to post a comment.