Hi
We were facing some problems with the browser caching. Blocks that we wanted to be made up every time user is refreshing the page, were cached in a browser so we had e.x. old comments list after making a new comment.
We've found a solution for that - adding a timestamp to all the server requests made by module, which makes the URL's unique and browser is always requesting a fresh data.
If it's a good solution maybe it's worth being comited.

Peace

Comments

warobushek’s picture

Which browser are you using? I tried in IE, Opera, FF, Chrome. It works fine.

maximpodorov’s picture

Does adding the following two lines to the very beginning of ajaxblocks_ajax_handler() function help?

  header('Cache-Control: private, no-cache, no-store, must-revalidate, max-age=0');
  header('Pragma: no-cache');

The modified function will look like this:

function ajaxblocks_ajax_handler() {
  header('Cache-Control: private, no-cache, no-store, must-revalidate, max-age=0');
  header('Pragma: no-cache');
  $content = array();
...
maximpodorov’s picture

Status: Active » Closed (fixed)
maximpodorov’s picture

Status: Closed (fixed) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.