Jump to:

3443 Posts in 1030 Topics by 871 members

Template Questions

SilverStripe Forums » Template Questions » FOUC in Silverstripe

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 406 Views
  • SamTheJarvis
    Community Member
    24 Posts

    FOUC in Silverstripe Link to this post


    On a few of my sites when using Requirements::CSS etc. when clicking between pages there's a very brief flash of white, before every page load, in every browser. This doesn't happen on every site using requirements.

    My remedy to this is to not use Requirements or <% require %> and use <link>, a mild inconvenience and not ideal.

    I notice Silverstripe puts a timestamp on the end of required file paths, what's the purpose of that? Could it be causing the issue? Because essentially the only difference between using the requirements and using <link> is this timestamp, and that required css are at the bottom of the <head> tag.

    Again, this is happening across a few sites, no current examples as they are all live and using <link>.


  • MarcusDalgren
    Community Member
    288 Posts

    Re: FOUC in Silverstripe Link to this post

    I do believe the timestamp is for versioning so when you update the CSS file or whatever the timestamp changes. This way the newer version will always be loaded instead of hitting the browser cache. Otherwise there's no difference whatsoever and there's no processing being done when the page hits the browser. It's all server side.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.