I’m developing a web site where I want the left menu to stay fix, while the content of the clicked option is loaded.
Actually, what I do is that each menu link using AJAX it return the requested content. Everything works fine but I would like to avoid it because then statistics are difficult to follow (among some other things like Google boots).
How can I do the same affect/similar (http://www.foundcrelamps.com/) without javascript?
What I would do is a bit different. I’d make the links on the menu valid links that point to the content. Eg
Contacteto point tohttp://www.foundcrelamps.com/contacteso that if you paste that link in the browser, it will load the page directly.Then keep the ajax, so that the user does not reload the whole page on every click.
You can use History.js to keep the browser history and modify the URL so that back/next buttons work, even with ajax.
Edit, if you use conventional
aelements with standardhrefit might look like this:Then on the server you should do something like this:
This way when you do ajax, you will load only the inner content. When not, it will load the whole page.
There is an alternative method – you might load the whole page with jQuery but only use inner part of the html to replace the original content.