We have discussed this
earlier[
^], haven't we?
Once again, in order to implement a back/forward button, you need to keep a track of all the URL's in sequence. It would be kind of a URL stack. Now, have two buttons. Back would traverse you to previous URL from current and forward would take you to next one.
Now, please give it a try! I don't see why or what's unclear here and stopping you.