Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Back button returns user to top of page


Guest

Recommended Posts

Posted

Hi,

 

I've noticed that using the back button in your browser always returns the user to the top of the page, rather to the point they were at on the page. It's very frustrating if the user has scrolled down a long list of products, viewed a product page, and then uses the browser back button to return to the list of products .... only to find they have to scroll to where they left off. I think this is a serious usability issue, and is enough to make people give up.

 

Is there anything that can be done about this? I'm assuming it's because the page is generated from a database, and all of the osCommerce sites I've looked at have the same issue, but I haven't found a solution either on these forums or elsewhere. Anyone got any suggestions or fixes... or are we stuck with it?

 

BTW, other sites (non-osCommerce, but still database driven) do return the user to the point on the previous page where they left off. So it must be possible...?

 

TIA,

Becca

Posted

I once set something up for a customer using an array of anchors and things to do it, but it was not ideal and IE (as usual) had some issues with it.

 

I am sure there is some javascript you could use to scroll accurately, but am not as good with js.

 

Rob

Rob Bell - Inspired Graphix

Customising osCommerce in Australia, and the world!

View my profile for web and email links.

 

I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture.

However viewing my profile may provide links to my website or something like that which you may find useful.

Posted
It's very frustrating if the user has scrolled down a long list of products, ...

Or you can go into your admin and set the number of products per page to a smaller number so scrolling a "long list of products" doesn't happen.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
I'm assuming it's because the page is generated from a database, and all of the osCommerce sites I've looked at have the same issue, but I haven't found a solution either on these forums or elsewhere. Anyone got any suggestions or fixes... or are we stuck with it?

 

BTW, other sites (non-osCommerce, but still database driven) do return the user to the point on the previous page where they left off. So it must be possible...?

 

i don't think it's because the pages are generated from information in a database. i think it's because the url is passing information via get variables. the browser is probably assuming that since these variables are being used to generate the page that it can't cache the page -- so even when you use the back button it's probably requesting a new page from the server. and whenever it requests a new page from the server it will display it starting at the top. unless of course you're using a bunch of anchors. this behavior could also be different depending on the browser you're using.

 

using javascript to solve the problem is probably a lot of work. you'd have to rewrite all the hrefs in the anchors to run javascript that would save the vertical scroll information and then follow the link. when the page is re-rendered, adjust the scroll to the old value (assuming nothing on the page has changed -- you could have added products, changed a product's description, etc. between page views...). it could be done, but it sounds to me like a lot of tedious work and you'd have to be pretty good at javascript (not to mention browser compatibility issues).

 

you might think some more on what your real issue is and see if there's another way to get around it, as with jim's suggestion on reducing the number of products displayed.

 

just my 2 cents. :) i hope this helps....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...