[xwiki-users] colorThemeInit and updating theme problem
Hello, I would like to have a specific color theme for my users depending of the groups. So I modified the colorThemeInit.vm to check the user group and apply a specific theme. My problem is after logging, I have to refresh the page manually to see the new theme, even if I click on a link in the wiki. How can I force a refresh automatically after logging? Should I call the template colorThemeInit somewhere else ? Thanks Regards Ben -- View this message in context: http://xwiki.475771.n2.nabble.com/colorThemeInit-and-updating-theme-problem-... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 04/23/2010 05:38 PM, Ben Stuggler wrote:
Hello,
I would like to have a specific color theme for my users depending of the groups. So I modified the colorThemeInit.vm to check the user group and apply a specific theme.
My problem is after logging, I have to refresh the page manually to see the new theme, even if I click on a link in the wiki.
How can I force a refresh automatically after logging? Should I call the template colorThemeInit somewhere else ?
This is a browser cache issue. Hard to solve at the moment, since the URL of the skin files is the same, yet the content differs. You can force a hard refresh using some Javascript code, window.location.reload(true); -- Sergiu Dumitriu http://purl.org/net/sergiu/
Sergiu Dumitriu-2 wrote:
This is a browser cache issue. Hard to solve at the moment, since the URL of the skin files is the same, yet the content differs.
You can force a hard refresh using some Javascript code,
window.location.reload(true);
Thanks, but I really don't know where or what I have to refresh. If I put this kind of function, for example in the menuview.vm, it will do a loop and refresh endlessly the page. -- View this message in context: http://xwiki.475771.n2.nabble.com/colorThemeInit-and-updating-theme-problem-... Sent from the XWiki- Users mailing list archive at Nabble.com.
Sorry to come back with this problem but I have not yet found a solution. I have to refresh the Main.Webhome (certainly with a window.location.reload(true);) just after the first connection. Is there anybody who have an idea of where and what I can do? Thanks Regards -- View this message in context: http://xwiki.475771.n2.nabble.com/colorThemeInit-and-updating-theme-problem-... Sent from the XWiki- Users mailing list archive at Nabble.com.
Ben Stuggler schrieb:
Sorry to come back with this problem but I have not yet found a solution.
I have to refresh the Main.Webhome (certainly with a window.location.reload(true);) just after the first connection. Is there anybody who have an idea of where and what I can do?
Thanks
Regards
Please try to add next two lines to skins/colibri/colibri.css which marks the css resource as uncachable. $response.setHeader('CACHE-CONTROL','NO-CACHE') $response.setHeader('EXPIRES','0') -- Denis
Denis Gotthans wrote:
Please try to add next two lines to skins/colibri/colibri.css which marks the css resource as uncachable.
$response.setHeader('CACHE-CONTROL','NO-CACHE') $response.setHeader('EXPIRES','0')
--
Denis _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
It's working ! Thank u very very much, you're saving my life! -- View this message in context: http://xwiki.475771.n2.nabble.com/colorThemeInit-and-updating-theme-problem-... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (3)
-
Ben Stuggler -
Denis Gotthans -
Sergiu Dumitriu