I run a browser based game at http://www.darknovagames.com. Recently, I’ve been working on reformatting the site with CSS, trying to get all of its pages to verify according to the HTML standard.
I’ve been toying with this idea of having the navigation menu on the left AJAX the pages in (rather than taking the user to a separate page each time, requiring a reload of the title and nav bar, which almost never change) and I know that if I do so, I will probably break the Forward/Back buttons in the browser. My question I guess is, should I go ahead and AJAX the site, thus requiring the user to use the sites navigation to play the game, or should I leave the site as it currently stands, and use standard hyperlinks and things for navigation?
The reason I ask I guess is that I built a forums system into the site, and a lot of times I would want to link say to a particular topic within the forums.
I’m also open to suggestions. Is there a standard (preferably without traditional frames) way to make only the body area of the site reload, while still changing the URL so that users can bookmark and forward/back, etc? That could potentially solve my problem as well. I’m just asking for the best solution here, not an answer to a specific question. ^_^
Thanks
If you’re going to enable AJAX, don’t do it at the expense of having accessible URLs to every significant page on your site. This is the backbone of a navigable site that people can use.
When you shovel all your functionality into AJAX calls and callbacks, you’re basically forcing your users into a single path to access the features and content that they want — which is totally against how the web is meant to function. People rely on the address bar and the back button. If you override all your links so that your site is essentially a single page that only updates through AJAX, you’re limiting your users’ ability to navigate your site and find what they need. It also stops your users from being able to share what they find (which, that’s part of the point, right?).
Think about a user’s mental map of your site. If they know they came in through the home page, then they went to search for something, then they landed on a games page, then they started playing a particular game, that’s four distinct units of action that the user took. They might have done a few other smaller, more insignificant actions on each of these pages — but these are the main units. When they click the Back button, they should expect to go back through the path they came in on. If you are loading all these pages through AJAX calls, you’re providing a site whose functionality runs contrary to what the user expects.
Break your site out into every significant function (ie, search, home, profiles, games — it’ll be dictated by what your site is all about). Anywhere you link to these pages, do it through a regular link and a static URL.
AJAX is fine. But the art of it is knowing when to use it and when not to. If you keep to the model I’ve sketched out above, your users will appreciate it.