Back button, previous page link

Back button, previous page link

Hi

Currently I have individual pages for the different categories of products and a details page, which is used for all the categories available. On the top of all pages is the 'Quick Cart' display

When I click on a product it takes me to the details page with the option to 'Add to Cart'. If I click Add to cart button all works as it should etc, but when i click the previous page link to take me back to the category I started from it will not take me back. It works ok if I do not add anything to the cart.

I have tried a few different ways to try and sort this but just doesn't work.

What do you need to get around this other than create individual details pages, which isn't ideal and may as well forget dynamic solutions.