Jump to content

AJAX navigation back button issue


ishnj

Recommended Posts

Our website is currently using AJAX to navigate through the pages without reloading the whole page over and over again if you click on next/previous or a page number (1|2|3|4.etc).

Now the problem with AJAX is that when you click on your browser's back button, instead of going back to which page you were on the AJAX page, you get sent back to the last page in your browser history instead.

So we were able to fix this AJAX back button issue by having the #pg1/2/3/etc attached to the end of the url (not by link but by the ajax). What this does is that it just reminds ajax which part of the ajax page we are currently in, and instead of using the browsers history it creates its own history so that when you click on your browser's back/forward button, the ajax remembers which page you were in.

Now the problem is with Search Engine Indexing.  Dynamic pages are often ignored by the search engine spiders. In fact, any URL containing special symbols like #, a question mark (?) or anampersand (&) will be ignored by many engines.

How can we spoof the back button for the search engines without using '#' symbol in the URL?
Link to comment
https://forums.phpfreaks.com/topic/36408-ajax-navigation-back-button-issue/
Share on other sites

ishnj

[quote]So we were able to fix this AJAX back button issue by having the #pg1/2/3/etc attached to the end of the url (not by link but by the ajax). What this does is that it just reminds ajax which part of the ajax page we are currently in, and instead of using the browsers history it creates its own history so that when you click on your browser's back/forward button, the ajax remembers which page you were in.[/quote]

Would you please elaborate on exactly what you did to accomplish this ?

Having a "broken" back-button is one of my biggest gripes about using AJAX.

Thanks,

Scot L. Diddle, Richmond VA

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.