Jump to content

Optimize Load


widMan

Recommended Posts

Hi all,

 

How to optimize these functions? To load the with array ... something.

<script src="{{ URL::asset('assets/js/jquery.min.js') }}"></script>
<script src="{{ URL::asset('assets/js/bootstrap.min.js') }}"></script>
<script src="{{ URL::asset('assets/js/menu.min.js') }}"></script>
<script src="{{ URL::asset('assets/js/ss.min.js') }}"></script>
<script src="{{ URL::asset('assets/js/ll.min.js') }}"></script>
<script src="{{ URL::asset('assets/js/app.min.js') }}"></script>
<script src="{{ URL::asset('assets/js/pace.min.js') }}"></script>

and

<link href="{{ URL::asset('assets/css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ URL::asset('assets/css/font-awesome.min.css') }}" rel="stylesheet">
<link href="{{ URL::asset('assets/css/animate.css') }}" rel="stylesheet">
<link href="{{ URL::asset('assets/css/style.css') }}" rel="stylesheet">

Thanks.

Link to comment
Share on other sites

Optimize how? Are you encountering performance issues and have you traced those issues to the loading of these files?

 

Or, are you just wanting to reduce the number of included script tags?

 

1St: "Are you encountering performance issues and have you traced those issues to the loading of these files."

Files (.js / .css) are compensated to to increase performance.

Link to comment
Share on other sites

Files (.js / .css) are compensated to to increase performance.

 

Sorry, I'm not sure what you mean by that. Are you making a statement or is that your request? I have no idea what "compensated to increase performance" means. js/css won't increase performance. Are you currently having a performance problem? If so, what have you done to identify the source of that problem that leads you to believe it is the css/js files?

 

If there is a performance problem due to those files it could be for many reasons.

 

1. The web server (or any server between you and the server) is having an issue in transmitting the files. There may not be anything you can do about this depending on where in the chain this is happening, It could require you to change hosts or your ISP.

 

2. The files could be excessively large. This would require you to refactor the code in those files to just include what you need. And it would also likely require the HTML pages to be recoded for those changes as well.

 

3. For the javascript, the code in those files could have performance issues. If so, you would need to rewrite that code to resolve the issue. If the loading of the page is dependent upon the javascript, you should revise it to have the page load THEN have the javascript do whatever it is you need it to do. Or, the javascript may have some long running processes that need to be fixed.

 

The fact that you are calling multiple files (only about 10) should not be an issue in and of itself. So, you need to perform some debugging to fine out exactly where your performance issues are, then post the relevant code and what you've found.

Link to comment
Share on other sites

My crystal ball says he wants to combine the files to reduce the number of requests. However, the statement that he has performance issues which he traced back to those files sounds like BS; I guess some automated website scanner told him that as vague advice to improve performance.

 

In any case, I'm still waiting for a coherent sentence from the OP.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.