Enforcing CSS Styles to be Loaded From Server ?

2009-08-17 Thread FaRHaN
I want to customize themes for my website for each Valid User, for that purpose 
i have a unique StyleSheet for each user. When a user Logs IN, a respective CSS 
file turned ON. The problem exist when a user Logs IN again after modifying 
styles (theme) of his website, the latest CSS file not being applied on the 
Website but preexisting styles for that user applied on the Website. 
When I Logs IN after clearing History (Cache) of the Browser(IE or FireFox), 
the latest styles are being applied. So I believe, problem exist in the Browser 
Cache. I have tried all Cache Headers for that purpose but it didn't work at 
all.
That's why i want to create a Random number in my URL (for HomePage) so that 
request to HomePage after Logging IN will go to Server (enforcing Styles to be 
loaded from Server, not from cache).

Is this a valid approach, and how i can add random number to my URL ?
Is there exist any other solution for clearing Browser's Cache ? 

Thanks...



  

Re: Enforcing CSS Styles to be Loaded From Server ?

2009-08-17 Thread bgooren

Farhan,

Please take a look at IResourceSettings (accessible from the application
object). More specifically at 

http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/settings/IResourceSettings.html#setAddLastModifiedTimeToResourceReferenceUrl(boolean)
setAddLastModifiedTimeToResourceReferenceUrl(boolean) 

Bas


Farhan Bajwa wrote:
 
 I want to customize themes for my website for each Valid User, for that
 purpose i have a unique StyleSheet for each user. When a user Logs IN, a
 respective CSS file turned ON. The problem exist when a user Logs IN again
 after modifying styles (theme) of his website, the latest CSS file not
 being applied on the Website but preexisting styles for that user applied
 on the Website. 
 When I Logs IN after clearing History (Cache) of the Browser(IE or
 FireFox), the latest styles are being applied. So I believe, problem exist
 in the Browser Cache. I have tried all Cache Headers for that purpose but
 it didn't work at all.
 That's why i want to create a Random number in my URL (for HomePage) so
 that request to HomePage after Logging IN will go to Server (enforcing
 Styles to be loaded from Server, not from cache).
 
 Is this a valid approach, and how i can add random number to my URL ?
 Is there exist any other solution for clearing Browser's Cache ? 
 
 Thanks...
 
 
 
   
 

-- 
View this message in context: 
http://www.nabble.com/Enforcing-CSS-Styles-to-be-Loaded-From-Server---tp25001539p25001595.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Enforcing CSS Styles to be Loaded From Server ?

2009-08-17 Thread FaRHaN
Thanks Bas...
It really works.





From: bgooren b...@iswd.nl
To: users@wicket.apache.org
Sent: Monday, August 17, 2009 11:27:12 AM
Subject: Re: Enforcing CSS Styles to be Loaded From Server ?


Farhan,

Please take a look at IResourceSettings (accessible from the application
object). More specifically at 

http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/settings/IResourceSettings.html#setAddLastModifiedTimeToResourceReferenceUrl(boolean)
setAddLastModifiedTimeToResourceReferenceUrl(boolean) 

Bas


Farhan Bajwa wrote:
 
 I want to customize themes for my website for each Valid User, for that
 purpose i have a unique StyleSheet for each user. When a user Logs IN, a
 respective CSS file turned ON. The problem exist when a user Logs IN again
 after modifying styles (theme) of his website, the latest CSS file not
 being applied on the Website but preexisting styles for that user applied
 on the Website. 
 When I Logs IN after clearing History (Cache) of the Browser(IE or
 FireFox), the latest styles are being applied. So I believe, problem exist
 in the Browser Cache. I have tried all Cache Headers for that purpose but
 it didn't work at all.
 That's why i want to create a Random number in my URL (for HomePage) so
 that request to HomePage after Logging IN will go to Server (enforcing
 Styles to be loaded from Server, not from cache).
 
 Is this a valid approach, and how i can add random number to my URL ?
 Is there exist any other solution for clearing Browser's Cache ? 
 
 Thanks...
 
 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/Enforcing-CSS-Styles-to-be-Loaded-From-Server---tp25001539p25001595.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com