How do I use replace_html without RJS ?

Um, if you are calling AJAX functions and Javascript response, you must use RJS. I’ll ignore the errors you are having and just answer your first issue: trying to get page hits faster, more caching of javascript. For that, please check out the Unobtrusive Javascript plugin here:

This puts the javascript for such calls as #link_to_function and #link_to_remote into a javascript file which can be cached by the browser. Give this plugin a try and let us know if you still have issues.