HTTP error 0 with Flag module

Hello,

I am very new to Drupal. We are using flag module to flag nodes for certain positions. Whenever we click on the link to set a flag we get below error intermittently. It is not consistent but approximately occurs once in five attempts. Another issue is whenever error occurs sometimes it performs required action on node and sometimes it doesn’t.

An HTTP error 0 occurred.https://localhost/flag/unflag/show_on_home_page/12258?destination=desks/…

Any pointers/ suggestions would help to resolve the issue. Site is about to go live and above issue started coming. Please provide valuable inputs to solve the issue.

Thanks,
Durgesh.

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed