/    Sign up×
Community /Pin to ProfileBookmark

I there,

I was wondering if is is possible to make a link that will bring the user to the last page they were viewing. If there is, could someone give me the source code?.

Thanks

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@Declan1991Jul 02.2009 — [code=html]<a href="#" onclick="history.go(-1);">Back</a>[/code]
With JavaScript enabled (most users), it'll jump back to the previous page in the history, and otherwise will jump to the top of the page.
Copy linkTweet thisAlerts:
@waletmp3Jul 04.2009 — &lt;a href="javascript:history.go(-1)"&gt;back&lt;/a&gt;

Or button.
<i>
</i>
&lt;script language="JavaScript"&gt; function goBack() { window.history.back() } &lt;/script&gt; &lt;input type="button" value="&amp;#171; Back" onClick="goBack()"&gt;
Copy linkTweet thisAlerts:
@CharlesJul 04.2009 — Better method:&lt;script type="text/javascript"&gt;
if (document.referrer) document.write ('&lt;a href="#" onclick="document.location = document.referrer"&gt;Back&lt;/a&gt;')
&lt;/script&gt;
×

Success!

Help @paulvanfootball spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...