Jump to content

[SOLVED] Navigation Speed


jaymc

Recommended Posts

I have a lot of javascript files on my website.

 

My question is, once they have visited the page hence all the .js files cached etc, will it slow down the page the fact that I have my javascript script split up in multiple files as appposed to 1 master

 

<script src="/java/jquery.3.1.2.js" type="text/javascript"></script> 
<script src="/java/jquery.simplyscroll.js" type="text/javascript"></script> 
<script src="/java/moorainbow/mootools.js" type="text/javascript"></script> 
<script src="/java/moorainbow/mooRainbow.js" type="text/javascript"></script> 
<script type="text/javascript" src="/java/flashobject.js"></script> 
<script type="text/javascript" src="/java/global-v5.js"></script> 
<script src="/java/popup.js" type="text/javascript"></script> 
<script type="text/javascript" src="/modules/flirtchat/js/config.js"></script> 
<script type="text/javascript" src="/modules/flirtchat/js/cookies.js"></script> 
<script type="text/javascript" src="/modules/flirtchat/js/fly.js"></script> 
<script type="text/javascript" src="/modules/flirtchat/js/dc.js"></script> 
<script type="text/javascript" src="/java/up_down_tooltip.js"></script> 
<script type="text/javascript" src="/java/drag.js"></script> 

 

I mean I could merge all the javascript code togeter in one file call java.js but its not very good to manage if I need to make changes.

Link to comment
https://forums.phpfreaks.com/topic/149969-solved-navigation-speed/
Share on other sites

Having multiple files should not make a perceptible difference. I would guess there would be some additional time involved due to the renegotiation to find the file and start the transfer, but I think we're talking microseconds. If you really want to know the impact - do a test. Assign getTime() to a variable before you load the external files and then assign getTime() to another variable after you load them - then check the difference. Then for comparison, put all the JS into one external file and run the test again.

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.