Link to home
Start Free TrialLog in
Avatar of naifyboy123
naifyboy123Flag for Afghanistan

asked on

code for previous page

without writing something in script form - is there an href i can write that takes a user back to the previous page they were on - kind of like the back button on a browser does?

i am hoping to use just html code to do this.
ASKER CERTIFIED SOLUTION
Avatar of Diablo84
Diablo84

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dorward
dorward

Its a bad idea to use href="#" or href="javascript:anything" for the reasons described at http://jibbering.com/faq/#FAQ4_24
if you don't want to use javascript, you can always use: <a href="previouspageurl.html">Go Back to your previous page</a>; which is what i use.

previouspageurl.html being the page they were on before clicking the link to get to where they are now.
if you wanted something that would take them back to a search engine or something, the javascript code would better suit your needs.
Avatar of naifyboy123

ASKER

thanks Diablo - i think i will have to use your option - do i need to enter anything in the Head for this to work - or do i just enter the code in body as it is?