jemz — 2013-03-22T07:15:41-04:00 — #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.
kjedi — 2013-03-25T08:45:47-04:00 — #2
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.
jimmybrion — 2013-03-25T09:43:01-04:00 — #3
Try below mentioned ways which might help you:
- Check your query time by directly firing on database
- Check whether are any large size images on page or any missing images which are used in the css
- In firefox by pressing F12, In Net section you can check which file is taking much time
- In console you can check whether there is any script which is taking much time
- Check if the html is the reason for the slow page load.
- 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.
jemz — 2013-03-26T11:23:56-04:00 — #4
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.