dongzhuo1880 2017-08-17 13:14
浏览 57

优先考虑可见内容 - 如何摆脱这种情况?

I am trying to optimize my website using the Google PageSpeed Insights tool. I am coming across one condition which is not getting solved my me, that is Prioritize visible content. Here is the snapshot:
The problem image

I have used various solutions available on the internet, still facing the same issue. You can check the website on Page Speed Insights: Here
I am looking for a generalized solution so this situation, so that I can apply that on my other websites too.

  • 写回答

1条回答 默认 最新

  • dsbckxk165039 2017-08-17 14:17
    关注

    This is about how you structure the DOM of your HTML and whats shown in the screen of the users as the page is loading. To fix this you have to understand how a browser loads a page. Most browsers try to show the content as soon as possible, but if it finds a resouce that needs to be downloaded such as CSS, image or JS file, it downloads those resources and parses them before proceeding with the main HTML. So lesser it finds those the better.

    There are several things you need to fix this. Here are some of the general instructions.

    1. add the sections of the pages that have the relevant content in the top part of the HTML DOM. Example would be if your page has sidebar, then your HTML should be in this order : <content></content><sidebar></sidebar> rather than adding sidebar first.

    2. Remove the render blocking codes

    3. Move all JS files to the footer of the page.

    评论

报告相同问题?

悬赏问题

  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示