문제

So, I just ran Google's Page Speed on my website and received the following notice:

enter image description here

Can someone please tell me what that means? And how to "eliminate" those unnecessary reflows?

I also tried to use http://code.jquery.com/jquery-1.6.2.min.js instead, but it tells me the same thing.

Plus, I want to use https over http, so I'd rather stick with Google's CDN.

I hope this isn't a case of premature optimization? Just curious.

도움이 되었습니까?

해결책

A reflow happens any time the page changes. This means that the page re-renders. This can happen when you add something to the dom or change a property on an element. One of the best ways to eliminate reflows is to detach elements from the dom, make your changes, and then reattach.

다른 팁

Well you are trying to access Google CDN the wrong way. The correct way will be

<script type="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script>

Note the lack of protocol. Per section 4.2 of RFC 3986, when the protocol is not specified, the protocol of the page will be used instead.

Read this: http://encosia.com/cripple-the-google-cdns-caching-with-a-single-character/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top