Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sdashiki

macrumors 68040
Original poster
Aug 11, 2005
3,529
11
Behind the lens
I need a "back" link.

but not one that I specifically specify, one that is based off the actual "back button" history of their browser.

for instance, a single page can be linked from multiple other pages, and it would be silly to have a back button go back to some arbitrary choice of mine instead of the actual page they came from to get here.

is this possible with simple CSS/HTML or am I in JS territory?

as always, i try googling for answers but keywords here, elude me.
 
Not recommended

If people want to browse to where they came from, they should use their browser's back button. That's what it's there for.

If I search for content in a search engine, then load your page (let's say page 31) and want to go back a page (page 30 of your content), the back link should do exactly that.

Using javascript for links will also break navigation for people with Javascript disabled (and that was about 5-10% last time I checked), and will also break indexing of your website (a lot, if not most, search engines can't follow javascript links).

Your content should have some structure, so your back button should send the user to the "parent page", such as going from "iPod shuffle" to "iPods". You know your content structure, so it's up to you to decide where that "back" link should go to.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.