faster loading of external css and JavaScript file

Laraship QuestionsCategory: New feature Requestfaster loading of external css and JavaScript file
nao asked 6 years ago
In recent years, the performance of website is very important and required. I wonder and hope Laraship to be faster diplaying. So, at css() and js() functions of Themes.php, when css and JavaScript code are write out, would you change like below? --css loading--- current: <link media="all" type="text/css" rel="stylesheet" href="abc.css"> my hope: <link media="all" type="text/css" rel="stylesheet preload" as="style" href="abc.css"> --JavaScript loading--- current: <script src="abc.js"></script> my hope: <script defer src="abc.js"></script> or '<script async src="abc.js"></script> I understand that if current code becomes like my hope, application can't work right. While, if you have any tips to be faster Laraship, can you tell me one?
1 Answers
laraship Staff answered 6 years ago
Hello when using defer for js you will need to make sure nothing got broken, I think you can do the following actions too :   combine JS and css and minify them. Use CDN to serve the asset files