Where to put css and javascript [on hold]











up vote
-4
down vote

favorite












If I understand Google encourages to put the css and javascript in the same page that the html. Internal css but not inline. On the other side, all the manuals and tutorials I have read say that I should use an external document.



Where should I put the css and javascript?



Note: in the design o my page there it makes no difference to use the css and javascript of the "above the folder" internal and the rest external. 90% or more of the css and javascript is for the content above the folder. In my case, it makes no sense make a distinction.



https://developers.google.com/speed/pagespeed/insights/
Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles



https://developers.google.com/web/tools/lighthouse/audits/critical-request-chains










share|improve this question















put on hold as too broad by dippas, Peter B, Michael Dodd, ekad, Makyen Nov 12 at 16:52


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1




    Can you tell us what led you to the conclusion in your first sentence?
    – Manos Kounelakis
    Nov 12 at 16:22






  • 1




    Possible duplicate of When should I use Inline vs. External Javascript?
    – Peter B
    Nov 12 at 16:26










  • @Mano Kounelakis. I updated the question with the Google links that led me to that conclusion
    – Nrc
    Nov 12 at 16:29















up vote
-4
down vote

favorite












If I understand Google encourages to put the css and javascript in the same page that the html. Internal css but not inline. On the other side, all the manuals and tutorials I have read say that I should use an external document.



Where should I put the css and javascript?



Note: in the design o my page there it makes no difference to use the css and javascript of the "above the folder" internal and the rest external. 90% or more of the css and javascript is for the content above the folder. In my case, it makes no sense make a distinction.



https://developers.google.com/speed/pagespeed/insights/
Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles



https://developers.google.com/web/tools/lighthouse/audits/critical-request-chains










share|improve this question















put on hold as too broad by dippas, Peter B, Michael Dodd, ekad, Makyen Nov 12 at 16:52


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1




    Can you tell us what led you to the conclusion in your first sentence?
    – Manos Kounelakis
    Nov 12 at 16:22






  • 1




    Possible duplicate of When should I use Inline vs. External Javascript?
    – Peter B
    Nov 12 at 16:26










  • @Mano Kounelakis. I updated the question with the Google links that led me to that conclusion
    – Nrc
    Nov 12 at 16:29













up vote
-4
down vote

favorite









up vote
-4
down vote

favorite











If I understand Google encourages to put the css and javascript in the same page that the html. Internal css but not inline. On the other side, all the manuals and tutorials I have read say that I should use an external document.



Where should I put the css and javascript?



Note: in the design o my page there it makes no difference to use the css and javascript of the "above the folder" internal and the rest external. 90% or more of the css and javascript is for the content above the folder. In my case, it makes no sense make a distinction.



https://developers.google.com/speed/pagespeed/insights/
Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles



https://developers.google.com/web/tools/lighthouse/audits/critical-request-chains










share|improve this question















If I understand Google encourages to put the css and javascript in the same page that the html. Internal css but not inline. On the other side, all the manuals and tutorials I have read say that I should use an external document.



Where should I put the css and javascript?



Note: in the design o my page there it makes no difference to use the css and javascript of the "above the folder" internal and the rest external. 90% or more of the css and javascript is for the content above the folder. In my case, it makes no sense make a distinction.



https://developers.google.com/speed/pagespeed/insights/
Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles



https://developers.google.com/web/tools/lighthouse/audits/critical-request-chains







javascript css pagespeed






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 at 16:28

























asked Nov 12 at 16:21









Nrc

3,869103774




3,869103774




put on hold as too broad by dippas, Peter B, Michael Dodd, ekad, Makyen Nov 12 at 16:52


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as too broad by dippas, Peter B, Michael Dodd, ekad, Makyen Nov 12 at 16:52


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    Can you tell us what led you to the conclusion in your first sentence?
    – Manos Kounelakis
    Nov 12 at 16:22






  • 1




    Possible duplicate of When should I use Inline vs. External Javascript?
    – Peter B
    Nov 12 at 16:26










  • @Mano Kounelakis. I updated the question with the Google links that led me to that conclusion
    – Nrc
    Nov 12 at 16:29














  • 1




    Can you tell us what led you to the conclusion in your first sentence?
    – Manos Kounelakis
    Nov 12 at 16:22






  • 1




    Possible duplicate of When should I use Inline vs. External Javascript?
    – Peter B
    Nov 12 at 16:26










  • @Mano Kounelakis. I updated the question with the Google links that led me to that conclusion
    – Nrc
    Nov 12 at 16:29








1




1




Can you tell us what led you to the conclusion in your first sentence?
– Manos Kounelakis
Nov 12 at 16:22




Can you tell us what led you to the conclusion in your first sentence?
– Manos Kounelakis
Nov 12 at 16:22




1




1




Possible duplicate of When should I use Inline vs. External Javascript?
– Peter B
Nov 12 at 16:26




Possible duplicate of When should I use Inline vs. External Javascript?
– Peter B
Nov 12 at 16:26












@Mano Kounelakis. I updated the question with the Google links that led me to that conclusion
– Nrc
Nov 12 at 16:29




@Mano Kounelakis. I updated the question with the Google links that led me to that conclusion
– Nrc
Nov 12 at 16:29












1 Answer
1






active

oldest

votes

















up vote
1
down vote













There is marginal performance improvement in combining html, css, and javascript in a single document. This theoretical performance boost is outweighed by the many complicating factors that come from trying to do this. You might be saving 20-40ms by combining documents, which is generally not something the end user can detect. You will find more important performance improvements in many other ways.



Merging documents, when done at all, should be acccomplished by using a server-side assembly process so that your code can be well partitioned and well maintained. An example of this is webpack.



But again, unless there is some specialized use case that makes this important, it is not standard practice.






share|improve this answer




























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    There is marginal performance improvement in combining html, css, and javascript in a single document. This theoretical performance boost is outweighed by the many complicating factors that come from trying to do this. You might be saving 20-40ms by combining documents, which is generally not something the end user can detect. You will find more important performance improvements in many other ways.



    Merging documents, when done at all, should be acccomplished by using a server-side assembly process so that your code can be well partitioned and well maintained. An example of this is webpack.



    But again, unless there is some specialized use case that makes this important, it is not standard practice.






    share|improve this answer

























      up vote
      1
      down vote













      There is marginal performance improvement in combining html, css, and javascript in a single document. This theoretical performance boost is outweighed by the many complicating factors that come from trying to do this. You might be saving 20-40ms by combining documents, which is generally not something the end user can detect. You will find more important performance improvements in many other ways.



      Merging documents, when done at all, should be acccomplished by using a server-side assembly process so that your code can be well partitioned and well maintained. An example of this is webpack.



      But again, unless there is some specialized use case that makes this important, it is not standard practice.






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        There is marginal performance improvement in combining html, css, and javascript in a single document. This theoretical performance boost is outweighed by the many complicating factors that come from trying to do this. You might be saving 20-40ms by combining documents, which is generally not something the end user can detect. You will find more important performance improvements in many other ways.



        Merging documents, when done at all, should be acccomplished by using a server-side assembly process so that your code can be well partitioned and well maintained. An example of this is webpack.



        But again, unless there is some specialized use case that makes this important, it is not standard practice.






        share|improve this answer












        There is marginal performance improvement in combining html, css, and javascript in a single document. This theoretical performance boost is outweighed by the many complicating factors that come from trying to do this. You might be saving 20-40ms by combining documents, which is generally not something the end user can detect. You will find more important performance improvements in many other ways.



        Merging documents, when done at all, should be acccomplished by using a server-side assembly process so that your code can be well partitioned and well maintained. An example of this is webpack.



        But again, unless there is some specialized use case that makes this important, it is not standard practice.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 12 at 16:28









        bluejack

        198112




        198112















            Popular posts from this blog

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?