PDA

View Full Version : Enable users to use less back-button clicks to leave dynamic pages.



djlebarron
18 Nov 2010, 05:49 AM
I've got pages with a lot of drop downs and radio buttons that generate dynamic content via php. I'm one that wears the browser back button to shreds no matter what site I'm on, and I didn't want to take up a lot of space on my pages with an elaborate and extensive menu. I'll provide a site map for the bots. Most of the site I'm working on is just a handful of pages with thousands of batches of dynamic content.

I was getting concerned about how much a user would have to click the back and forward browser buttons to navigate between those few pages, because they would have to wade back (and forward) through however many page reloads occurred every time new content was called to a page.

I came across
<a href="index.php?h=help" onClick="javascript:location.replace(this.href); event.returnValue=false; "></a>When it's used on a single dynamic page with numerous php calls for content such as, <a href=guide.php?h=help></a>, it will take you back to the previous page with it's last content and then when the back button is clicked again, take you back to the page before that with it's last content, e.g. "index.php?i=co", etc. Instead of clicking forever through "guide.php?h=help, guide.php?f=x, guide.php?f=x&n=21, and so on, looking at tons of stuff you've already seen, just to get to index.php. The browser will skip all the content reloads that occurred between the time you first opened the page and the last content that was displayed on that page. The reason is that all those page reloads you don't have to click through again were wiped from the browser history and replaced with the page's last content (that page's last reload).

It really tidied things up. Thought I'd pass it along.