I have been trying to make some html and css pages. Every time when I load a page. It always give me about half a second flash of the html page without the css style. Anyone know why that happens and how to fix it? Thanks in advance.
Solved: thanks guys, I just place my jquery at the bottom and it fix the problem.
for others who have the same problem,
in my situation the delay was from autofocus=""
attribute in the text input, so I removed that and the problem solved!
hope this helps
I would suggest the following :-
Remove any jquery from header and place it to the bottom of the page .
Remove excess white space from your coding.
Reduce the size of your images files.
Try to combine many scripts into one if possible.
Remove any unnecessary elements .
Combine all style sheets into one - lesser files , lesser response time and faster loading time.
Optimize your background image or any image you are using on the page for faster loading.
In the end use Gzip to minify JS , CSS and HTML . Never use it on images,videos,pdf's - wont do any additional compression ,but might increase the size .
Just one LINK element or SCRIPT element inside a document's HEAD element will prevent a flash of unstyled content.
Put a script tag with 0 inside the head
<head>
<!-- Other head stuff ... -->
<script>0</script>
</head>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With