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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.