(Reposted from mediawiki-l due to zero responses.)
I've been adding custom tools to the WikiEditor toolbar (MW 1.17.0 version) and am
running into difficulty with browser caching.
When I do something simple, such as adding a button or changing text in a dialog, the
change doesn't take effect in my browser due to caching. Even if I hard-refresh
(ctrl-F5), the changes do not appear. I have to delete my browser's cached content
(e.g., in Firefox, Tools / Options / Advanced / Network / "Clear Now") to see
the change. That seems extreme: a browser refresh or hard-refresh ought to be sufficient,
right? Or ideally, no refresh at all.
This is in Firefox 7.1, Firefox 3.6, and IE8.
For example, I created a new dialog:
$('#wpTextbox1')
.wikiEditor('addModule', {
'dialogs': {
'mytool-module': {
title: "My title",
id: 'mytool',
html: function() {
return '<p>foo bar</p>';
},
...
which is launched from a button:
$('#wpTextbox1')
.wikiEditor('addToToolbar',
{
'section': 'main',
'group': 'insert',
'tools': {
'mytool': {
'label': 'my label',
'type': 'button',
'icon': mypath,
'action': {
'type': 'dialog',
'module': 'mytool-module'
}
}
}
}
);
Now if I modify the HTML of the dialog to be "foo bar BLAT" instead of "foo
bar", I still see "foo bar" until I clear the browser cache.
However, I can change other parts (say, the button label) without this caching happening.
Is there something else special I should be doing to avoid this level of heavy caching?
Thanks,
DanB