I am not sure if I follow exactly what you are having problems with. Without seeing the code in question it is difficult for anyone to really help you. Does your site use AJAX to update pages? Perhaps you would have some luck debugging using
plugin. So post your code, minus any sensitive information (database connection details such as username/password etc), if you have an example URL which is available to the public that demonstrates this issue, that can only help too. Check out