Not sure why something working on locally is not working on server. What I can see is to get list of favorite documents you are using doclist webscript with parameter. This is the way to get favorite document but not the ideal way. To get list of favorite documents Alfresco providing <a href="http://docs.alfresco.com/5.0/pra/1/concepts/pra-favorites-get-favorites.html">REST API </a>. By using it you can get list of favorite document for particular user.
http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/people/gawadesk/favorites
This will provide list of favorite document for user mentioned in URL in JSON format. You can always parse that JSON and display in your page.Please let me know if this solve your problem.