Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8216411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:06:52+00:00 2026-06-07T12:06:52+00:00

I have a page, php and javascript. Sometimes, the javascript files do not load,

  • 0

I have a page, php and javascript. Sometimes, the javascript files do not load, then my page will work properly.

I have include 5 javascript file (jQuery plug-in), i want to know:

  1. how can i improve javasccript loader?
  2. how can i reload the scriptfile if the script files do not loaded properly?

I have checked when the php page takes more than 10 sec to load the page will be broken.

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T12:06:54+00:00Added an answer on June 7, 2026 at 12:06 pm

    Tip #1:

    Have the Javascript files load at the end of your page.

    Javascript does not need to be send over HTTP so soon, as it’s use is only for dynamic changes after the page is loaded.

    Move:

        <script  type="text/javascript" src='src/jquery_1.7.min.js' ></script>
        <!-- fancybox -->
        <!--<script type="text/javascript" src="src/jquery.mousewheel.js"></script>-->
        <script type="text/javascript" src="src/jquery.fancybox.js?v=2.0.6"></script>
        <script type="text/javascript" src="helpers/jquery.fancybox-buttons.js?v=1.0.2"></script>
        <script type="text/javascript" src="helpers/jquery.fancybox-thumbs.js?v=1.0.2"></script>
        <script type="text/javascript" src="helpers/jquery.fancybox-media.js?v=1.0.0"></script>
        <script type="text/javascript">
            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-16476667-10']);
            _gaq.push(['_trackPageview']);
            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();
    
            function fireWhenReady() {
                if (typeof function1 != 'undefined') {
                    function1();
                }
                else {
                    setTimeout(fireWhenReady, 100);
                }
            }
            $(document).ready(fireWhenReady);
        </script>
    

    to the bottom of the page.

    Tip #2:

    In addition, try and maintain your Javascript code in two versions:

    1. Sandbox: Your version of the code which is divided nicely into modules.
    2. Release: The website’s version of the code which is placed all into one Javascript file and minified using something like YUI Compressor. This reduces the file size and increases load speed by decreasing the amount of HTTP requests accordingly.

    Tip #3:

    Replace:

    <script type="text/javascript" src='src/jquery_1.7.min.js' ></script>

    with:

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

    Most users today have the Google API version of jQuery cached so this loads much faster than having to load your version on hand.

    Enjoy and good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP File with something like this: <script type=text/javascript> var page =
I have a php page and i have some javascript code to have a
I have a page index.php that uses a modal to upload files. After those
I have a page (main.php) which loads content from an external PHP file (rpc.php).
I have a PHP page where i want to open a file on a
I have a PHP page that loads external content using other PHP files. I'm
I have an intranet page that uses #include to include other files such as
I have a PHP / Javascript page that automatically logs a user into different
I have a page with php and javascript. In the php section i need
I'm new to javascript, my problem is effectively: I have a php page that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.