Drupal 7 is too slow on “first load”

后端 未结 4 1880
我寻月下人不归
我寻月下人不归 2021-02-09 08:56

I hope someone can help me with this Drupal 7 issue. I noticed that loading time is very slow when I enter the site address for the \"first time\". It takes about 20 (average) s

4条回答
  •  花落未央
    2021-02-09 09:20

    Take a look at what you have in your website's head section. If there are lots of @import statements in there then the problem most likely in frontend rather than backend.

    Drupal uses a lot of .css and .js files by default. Browser can start drawing the page you request only after all .css and .js files from head section are got downloaded.

    The problem with @import is that your browser can download just a single css file at a time. It is different case with tag. Css files can be downloaded in parallel in this case which means faster.

    The second time you visit website css and js files are loaded from browser cache and this explaines why pages load faster.

    Suggested workaround: Go to admin/settings/performance enable css and js aggregation.

提交回复
热议问题