colorThemeInit and updating theme problem

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

colorThemeInit and updating theme problem

Ben Stuggler
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
Reply | Threaded
Open this post in threaded view
|

Re: colorThemeInit and updating theme problem

Sergiu Dumitriu-2
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/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: colorThemeInit and updating theme problem

Ben Stuggler
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.
Reply | Threaded
Open this post in threaded view
|

Re: colorThemeInit and updating theme problem

Ben Stuggler
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
Reply | Threaded
Open this post in threaded view
|

Re: colorThemeInit and updating theme problem

Denis Gotthans
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
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: colorThemeInit and updating theme problem

Ben Stuggler
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
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

It's working ! Thank u very very much, you're saving my life!