Hello Santosluiz,
Thanks for the question about making above the fold optimization WITHOUT plugins. Make no mistake, this is definitely an advanced subject and you MUST be familiar with everything loading with your WordPress site. My answer to you is based on a post by a web developer named Mr. Stefan Ledin (The WordPress Performance Challenge, part 7: Success is found above the fold).
His premise is that you can’t make a WordPress website perform quickly without these three things:
- Load stylesheets asynchronously
- Insert critical, above the fold CSS into < head >
- Move scripts to the bottom and load them asynchronously
His article details his research into the issue and how he used plugins to resolve the problem resulting in a lighting fast page. As per your request, your are looking for optimization above the fold without plugins. So, I looked for coding solutions for these 3 basic steps. Believe it or not many people have looked at this issue and a few have published their findings.
The first option was to load stylesheets asynchronously. This link goes to a Github page which provides code for modification of the functions.php and loadcss.js that enable you to load the stylesheets in the order to that you specify. You will need to determine what you are loading and how to add them into the code to load asynchronously.
The second step deals with the CSS. This post by Joe Watkins details his approach in determining the critical CSS that needs to be loaded above the fold. His goal is also geared towards creating a high-performance WordPress site. He uses a tool called gruntcriticalcss in order to pick out the styles needed to be loaded in the above the fold optimization. Note that he also uses plugins in his efforts towards a solution for speeding up WordPress.
Finally, the last step has to do with moving scripts that do not need to be loaded in the above the fold optimization. You would need to move them so that they load AFTER everything has been loaded with your above the fold optimization.
You mentioned that the above the fold optimization solutions need to apply to multiple pages. If you are trying to apply the optimizations with different pages, then you would need to identify the different page “heads” that you want to optimize. In general, the optimization for “above the fold” applies to the central page loaded on a website and that “head” may stay with most pages. However, depending on your theme, you may see a different header and you would need to apply your optimization according to what is loaded in those pages. You should be able to identify these different headers in the theme used with your WordPress site. If you require further help with the theme code, I highly recommend speaking with the theme developer(s).
I know I speak very vaguely in some instances regarding what has to be moved, but it will all depend on your WordPress installation and what you are loading. As I’m sure you know, the complexity of all these tasks may be better resolved with plugins, but that will be a decision you will need to make. I hope that this summary from several different sources provides the information you seek. If anything, it provides you with other resources in optimizing your WordPress site.
Regards,
Arnel C.
-
This reply was modified 8 years, 2 months ago by
Arnel C.. Reason: added thoughts on multiple page optimization
-
This reply was modified 8 years, 2 months ago by
Arnel C..