SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,104
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Post Why my jquery loads very slow 1

    Hi, I have some problem when i develop my page in localhost ,it runs smoothly the page will load normally, but when i tried to put in my free host.the page now will load very slow,even displaying the data in the table,it takes 45secs. or 1min to load the page.can you please advice me what is the problem on my page.


    Thank you in advance.

  2. #2
    SitePoint Addict KJedi's Avatar
    Join Date
    Sep 2005
    Location
    Ukraine, Nikolaev
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Potential problems:
    1) You used some kind of loader that loads scripts sequentially using dependencies between them. This works fine on localhost, but takes time in web. Solution is to use some build system and combine them in one file, minimize it later using YUI compressor or google closure
    2) Lots of small images (usually, icons or images for hover effects for buttons), each loads with a separate http request, which is slow. Solution is to use sprites.
    3) Slow server
    4) a multitude of other reasons

    In order to debug this, open chrome developer tools with a network tab enabled and reload the page. See what requests go to the server and how you can minimize them. Then see where time was spent - on data transfer or on page generation. If former - your connection or server's connection is slow. Less probable reason is that server is too loaded and responds slowly. If page generation (waiting time) takes lots of time (more than 1sec), look into your scripts.

    It is impossible to help more until you show the page itself.
    IQ RIA - Delivering smart web-applications
    High-quality PHP, Yii, Ruby on Rails, ExtJS, Backbone, EmberJS and jQuery consulting.
    Dashboards, HTML5 and CRM development.
    Request a quote now!

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2011
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Jemz,

    Try below mentioned ways which might help you:

    1. Check your query time by directly firing on database
    2. Check whether are any large size images on page or any missing images which are used in the css
    3. In firefox by pressing F12, In Net section you can check which file is taking much time
    4. In console you can check whether there is any script which is taking much time
    5. Check if the html is the reason for the slow page load.
    6. Try to print the data directly without the table etc. and check if that works fine

    There can be multiple reason for the page getting load slow.
    PHP Programming Itís more than just writing code

  4. #4
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,104
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by KJedi View Post
    Potential problems:
    1) You used some kind of loader that loads scripts sequentially using dependencies between them. This works fine on localhost, but takes time in web. Solution is to use some build system and combine them in one file, minimize it later using YUI compressor or google closure
    2) Lots of small images (usually, icons or images for hover effects for buttons), each loads with a separate http request, which is slow. Solution is to use sprites.
    3) Slow server
    4) a multitude of other reasons

    In order to debug this, open chrome developer tools with a network tab enabled and reload the page. See what requests go to the server and how you can minimize them. Then see where time was spent - on data transfer or on page generation. If former - your connection or server's connection is slow. Less probable reason is that server is too loaded and responds slowly. If page generation (waiting time) takes lots of time (more than 1sec), look into your scripts.

    It is impossible to help more until you show the page itself.

    Hi thank you for the reply...what you mean
    You used some kind of loader that loads scripts sequentially using dependencies between them. This works fine on localhost,
    ..I am using the jquery.js i downloaded the script from the site and saving it in the notepad...and also i donwloaded the plugin alert box, i also put this in one folder.I don't know how to use the YUI compressor.

    Where i can get this ?
    minimize it later using YUI compressor or google closure

    Thank you in advance.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •