Hi there,
First of all, thanks for a great module!
I'm using this on some radio station web sites to refresh 'on air now' info blocks. It works a treat.
However under some circumstances anonymous users are seeing stale 'on air now' info. As far as I can tell, drupal is serving cached pages with stale data prior to the first triggered block refresh.
To defeat this it would be awesome to add an option to refresh on initial page load as well as after xxx seconds. There would be a small performance hit, but it's much preferable to flushing the whole page cache and re-rendering.
I had a quick look at the code this morning, and I figure this shouldn't be too hard to do. I'll submit a patch shortly.
Comment | File | Size | Author |
---|---|---|---|
#3 | block_refresh_init-2072245-3.patch | 6.11 KB | tripper54 |
#1 | block_refresh_init-2072245-2.patch | 5.63 KB | tripper54 |
Comments
Comment #1
tripper54 CreditAttribution: tripper54 commentedHere's a bash at it.
Comment #2
0mni CreditAttribution: 0mni commentedWorks well, but you have a big bug in your patch :)
The top of block_refresh.js needs to be as follows:
Comment #3
tripper54 CreditAttribution: tripper54 commentedWell spotted.
Updated patch attached.
Comment #4
tripper54 CreditAttribution: tripper54 commented(updated version) committed to 7.x-2.x branch