Page flashes when giving F5

Asked

Viewed 50 times

0

I don’t know if my doubt is ordinary or not.

I’m creating a website, it’s totally optimized (Super Light Images, Codes, Scripts, etc.), however, whenever I refresh the page, it kind of flashes a white screen quickly and opens the page. How can I fix this?

  • You mean there is a more time-consuming white screen or with different behavior from other web pages?

  • It flashes blank very quickly. I know the information is coming from the server. But I’ve seen sites that don’t feature this. I wonder if there’s a way to contain...

  • It may be a case of Flash of Unstyled Content (FOUC). Do you have the site online? or you can put an exepmlo online and the code here? The site is dependent on Javacript at the beginning?

1 answer

0

Avoid completely, I believe you do not have a definitive solution, but there are some practices that will help you mitigate this problem, some done on the client side and others on the same server.

Html

  • Stylus sheets should be declared at the beginning of the file.
  • Scripts must be declared at the end of the file.
  • Add a background color through the attribute and style in the tag <html> and <body>
    <body bgcolor="#ccc" style="background-color:#ccc;">

  • Avoid making requests POST when a GET can be used

Server

  • Configure and enable Cache.
  • Compression for file transfer static (GZIP)
  • Distribute content that can be downloaded in parallel on different hosts (CDN)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.