I have created a new rails3 project but I am seeing following logs many times in my server logs. Why I am getting these request and how can I avoid these?
Note that this can happen even when the user has NOT bookmarked the site to their iOS home screen - for example, any time you open a page using Chrome for iOS, it does a GET "/apple-touch-icon-precomposed.png".
I've handled this and other non-HTML 404 requests in my ApplicationController as follows:
respond_to do |format|
format.html { render :template => "error_404", :layout => "errors", :status => 404 }
format.all { render :nothing => true, :status => 404 }
end
The format.all response takes care of images such as this PNG file (which does not exist for my site).