I want to refresh a views block whenever new content is added. I am using views auto refresh module
Quick HOWTO: Using a ping script
Using a ping script is essential for production environments, to avoid a full Drupal bootstrap at each refresh.
Create a new page view Copy the file ping.php.example to your Drupal root folder and rename it as ping.php Edit ping.php such that DRUPAL_ROOT points to your Drupal root, and adjust the query: $result = $db->query("SELECT count(nid) FROM node WHERE created > $timestamp");
to reflect your view's generated SQL query. Make sure to keep the created condition in the query. Add a new header of type Global: Autorefresh with: Set the interval time to 5000ms Check Use a ping url In Path to the ping script, enter ping.php Save the view and open its page In a second browser tab, add a new content that fits the view's criteria See the new content in the view!
Is there any other way we can refresh a views when content is created