Limit server request per page

I think that each of them goes through this problem. On my page, I use jQuery, jQuery UI and many plugins, and usually all of these plugins, including the user interface, have their own separate CSS. In addition, I have the habit of sharing my CSS according to the module in different files.

So now, when I load the page, it asks the server for at least 30 additional resources, consisting of styles, and scriptsnot forgetting includes, and requiresPHP. In slower PCs (by this I say systems with 1 GB Ram, which should be more than enough, I think). I find that my pages are slowing down even on the local server.

Now this is really unacceptable, and I need a serious suggestion to fix this problem.

+3
source share
4 answers

If the site is slow for end users, you need to find out exactly why.

  • You can measure how long the server side will take, which can be a bottleneck.
  • The overall latency of your server can be another bottleneck.
  • You can measure how much time is running on the client side, which can be a bottleneck if you notice a decrease in performance on the client.

Javascript , . , Javascript, . JQuery? ? ?

? PHP?

CSS ? ?

require include, .

+1

. . . xhtml , , css js, .

script, , xpath, css . , , , , . script . , , . css....

, , - mod_pagespeed:

http://code.google.com/speed/page-speed/docs/module.html

+1

: includes requires .

Also, your pages are slow (maybe too much javascript?) Or they load slowly (too many requests?). In the case of the second, the first thing to do is to combine different css and js files in one css and one js file.

0
source

Try GZIP compression for CSS and JS. You just need some htaccess files and it compresses all css and js throughout the website when it loads in the browser.

0
source

All Articles