• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 150
  • Last Modified:

Why does my refresh take so long with the adding of links to a couple javascript libraries?

I haven't researched this enough to know why so I was hoping someone could tell me why there was a noticeable delay (slow down) in my page refresh after I added some javascript and jQuery code (and library link references) to a page? Is it simply the time that it takes to go out through the internet (each time the page loads) to find these libraries that is causing the delay? Is there a way to improve the performance?

my javascript / jQuery

    <script type="text/javascript" src="http://cod.jquery.com/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
    <script type="text/javascript">

        var delay = (function () {
            var timer = 0;
            return function (callback, ms) {
                timer = setTimeout(callback, ms);

        $(document).ready(function () {
            var updateWait = setTimeout(fadeUpdate, 3000);
            function fadeUpdate() {


        <div class="updateAlert">
            <asp:Panel runat="server" ID="pnlUpdateConfirmation" Visible="false" CssClass="UpdatedMessage Alert SavedSmall">
                    <asp:Label runat="server" ID="lblConfirmationMsg"></asp:Label></h3>

Open in new window

Michael Sterling
Michael Sterling
1 Solution
you've jQuery twice lines 3 and 4, choose the more recent one until you need a specific version.
the last one compatibl with old browser is 1.11.1 : https://developers.google.com/speed/libraries/devguide?hl=fr#jquery

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

Open in new window

Michael SterlingWeb Applications DeveloperAuthor Commented:
BINGO! Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now