Passing tmpl=component in url renders page without template (header, footer etc) but it still renders
I created custom component_ajax.php compoment file in root of template and passed tmpl=component_ajax in ajax request. In component_ajax.php removed all parts which are not needed and kept only . Removed all other html tags. So what i get in ajax response is the content only.