1 2 Previous Next 19 Replies Latest reply on Jul 22, 2013 12:50 PM by clubok

    Very Odd Skin Cache Issue

    tom_goring

      Hi,

      I've been using richfaces for a while... thanks for a great product but I'm getting a odd problem with skins.

      My application allows the user to change the skin. I do this using a web.xml like:

      <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>#{userPreferences.skin}</param-value>
       </context-param>
      


      However it seems like somewhere some of the skin CSS of something is cached as it does not reliably work (in any browser). I get a random skin.... even though if I display in the screen #{userPreferences.skin} and the values is OK.

      Any ideas ?

        • 1. Re: Very Odd Skin Cache Issue

          No idea yet. We never meet such problem yet.
          How can we reproduce?
          What Servlet Container, what JSF implementation, what RichFaces version, what kind of browsers?

          • 2. Re: Very Odd Skin Cache Issue
            tom_goring

            Thanks for the v.quick reply.

            I can't reliably reproduce.... sorry.

            Jboss 4.2.2.GA, Seam 2.0.1.CR1, richfaces 3.2.0 (I got this problem in an older version though).

            I just hard coded my app to blue sky and restarted and even then it picked up the wrong skin. I had to force refresh on it CTRL f5 to get it to work that time.

            Another odd problem that when I deployed it seemed to be hit my localhost env and maybe that is where the problem is coming from... I can't see localhost ref in any html page though.... very odd. Some odd thing is going on !

            any ideas ?


            • 3. Re: Very Odd Skin Cache Issue
              tom_goring

              browsers:
              ubuntu & firefox
              xp & ie

              i think something is getting cached somewhere..... any ideas?

              • 4. Re: Very Odd Skin Cache Issue

                What the style loading strategy you use? I mean the richfaces param in the web.xml

                • 5. Re: Very Odd Skin Cache Issue
                  tom_goring

                   

                  "SergeySmirnov" wrote:
                  What the style loading strategy you use? I mean the richfaces param in the web.xml


                  I don't have any defined... the only richfaces thing in my web.xml is :
                  <context-param>
                   <param-name>org.richfaces.SKIN</param-name>
                   <param-value>#{userPreferences.skin}</param-value>
                   </context-param>
                  


                  do i need to provide this?

                  • 6. Re: Very Odd Skin Cache Issue

                    Couple more questions to you:

                    1. What does "when I deployed it seemed to be hit my localhost env" mean literally.

                    2. Do you speak about the skin changes after a regular page update or it is about partial page update by Ajax calls?

                    • 7. Re: Very Odd Skin Cache Issue
                      tom_goring

                       

                      "SergeySmirnov" wrote:
                      Couple more questions to you:

                      1. What does "when I deployed it seemed to be hit my localhost env" mean literally.


                      I deployed to my dev internet server and something must have been still referencing localhost as i could see hit's to it. I stopped localhost and my dev internet server still had the odd skin thing... it's like the css cached somehow and is referencing a localhost skin image.

                      "SergeySmirnov" wrote:

                      2. Do you speak about the skin changes after a regular page update or it is about partial page update by Ajax calls?


                      Nothing todo with ajax... I can close all my browser windows and even my login page on display renders the wrong skin.

                      • 8. Re: Very Odd Skin Cache Issue
                        nbelaevski

                        Hello,

                        Could you please post URLs that link elements contain? Please do not take them from page source, but use some tool showing actual DOM tree (e.g. Firebug or IE developer toolbar).

                        • 9. Re: Very Odd Skin Cache Issue
                          tom_goring

                           

                          "nbelaevski" wrote:
                          Hello,

                          Could you please post URLs that link elements contain? Please do not take them from page source, but use some tool showing actual DOM tree (e.g. Firebug or IE developer toolbar).


                          I'm not sure what you mean... I'll try and post tomorrow a URL live on the internet to demo my problem.

                          can you give a clue as to what you think my problem maybe?

                          • 10. Re: Very Odd Skin Cache Issue
                            nbelaevski

                            I'm talking about that: http://picbite.com/10564gekacc/

                            • 11. Re: Very Odd Skin Cache Issue
                              nbelaevski

                              Don't know why that could happen. I hope the information requested could help us with that.

                              • 12. Re: Very Odd Skin Cache Issue
                                tom_goring

                                Here is a sample URL

                                http://dev3.jnet.ltd.uk/S2JNET/login.seam

                                But the skin is OK at the mo ... but maybe you can see a problem?

                                • 13. Re: Very Odd Skin Cache Issue

                                  RichFaces adds some hash value to each URL to the css resources (see the screenshot above). This hash is different for different skin. So, as far as URLs are different it could not be a traditional caching issue for resources.
                                  No any clue yet.

                                  • 14. Re: Very Odd Skin Cache Issue
                                    nbelaevski

                                    Could you please add change skin button to that demo?

                                    1 2 Previous Next