Skip to main content
Page speed, compression, ranking
Source Link
MrWhite
  • 43.1k
  • 4
  • 50
  • 90

Putting all 15kb CSS file inline on 100 pages of the site is not smart I think.

Correct, that would be bad. Primarily because the browser won't be able to cache this (or rather it will cache it once for every page!). It will be slower and will use more bandwidth.

I would only consider defining CSS in the HEAD section of the page itself (which I assume is what you mean by "inline") if those CSS classes / IDs are only relevant on that one page and there is no possibility of it being reused. Otherwise the styles should all go in your external CSS file.

You would perhaps only consider having the entire CSS in the HEAD section if you were developing a single page website (although for ease of development you would keep it as external until you distributed it).

If "page speed" is a concern then also consider implementing gzip compression on your pages if you haven't already. This serves the compressed page to the client (which is often considerably smaller than the uncompressed page) - so is a lot quicker and also saves you bandwidth.

Page Speed is just one metric that Google will use in order to determine ranking. But only if your site is particularly slow is it likely to count against you. It is more likely to affect your users than your ranking.

Putting all 15kb CSS file inline on 100 pages of the site is not smart I think.

Correct, that would be bad. Primarily because the browser won't be able to cache this (or rather it will cache it once for every page!). It will be slower and will use more bandwidth.

I would only consider defining CSS in the HEAD section of the page itself (which I assume is what you mean by "inline") if those CSS classes / IDs are only relevant on that one page and there is no possibility of it being reused. Otherwise the styles should all go in your external CSS file.

You would perhaps only consider having the entire CSS in the HEAD section if you were developing a single page website (although for ease of development you would keep it as external until you distributed it).

Putting all 15kb CSS file inline on 100 pages of the site is not smart I think.

Correct, that would be bad. Primarily because the browser won't be able to cache this (or rather it will cache it once for every page!). It will be slower and will use more bandwidth.

I would only consider defining CSS in the HEAD section of the page itself (which I assume is what you mean by "inline") if those CSS classes / IDs are only relevant on that one page and there is no possibility of it being reused. Otherwise the styles should all go in your external CSS file.

You would perhaps only consider having the entire CSS in the HEAD section if you were developing a single page website (although for ease of development you would keep it as external until you distributed it).

If "page speed" is a concern then also consider implementing gzip compression on your pages if you haven't already. This serves the compressed page to the client (which is often considerably smaller than the uncompressed page) - so is a lot quicker and also saves you bandwidth.

Page Speed is just one metric that Google will use in order to determine ranking. But only if your site is particularly slow is it likely to count against you. It is more likely to affect your users than your ranking.

added 213 characters in body
Source Link
MrWhite
  • 43.1k
  • 4
  • 50
  • 90

Putting all 15kb CSS file inline on 100 pages of the site is not smart I think.

Correct, that would be bad. Primarily because the browser won't be able to cache this (or rather it will cache it once for every page!). It will be slower and will use more bandwidth.

I would only consider defining CSS in the HEAD section of the page itself (which I assume is what you mean by "inline") if those CSS classes / IDs are only relevant on that one page and there is no possibility of it being reused. Otherwise the styles should all go in your external CSS file.

You would perhaps only consider having the entire CSS in the HEAD section if you were developing a single page website (although for ease of development you would keep it as external until you distributed it).

Putting all 15kb CSS file inline on 100 pages of the site is not smart I think.

Correct, that would be bad. Primarily because the browser won't be able to cache this (or rather it will cache it once for every page!). It will be slower and will use more bandwidth.

I would only consider defining CSS in the HEAD section of the page itself (which I assume is what you mean by "inline") if those CSS classes / IDs are only relevant on that one page and there is no possibility of it being reused. Otherwise the styles should all go in your external CSS file.

Putting all 15kb CSS file inline on 100 pages of the site is not smart I think.

Correct, that would be bad. Primarily because the browser won't be able to cache this (or rather it will cache it once for every page!). It will be slower and will use more bandwidth.

I would only consider defining CSS in the HEAD section of the page itself (which I assume is what you mean by "inline") if those CSS classes / IDs are only relevant on that one page and there is no possibility of it being reused. Otherwise the styles should all go in your external CSS file.

You would perhaps only consider having the entire CSS in the HEAD section if you were developing a single page website (although for ease of development you would keep it as external until you distributed it).

Source Link
MrWhite
  • 43.1k
  • 4
  • 50
  • 90

Putting all 15kb CSS file inline on 100 pages of the site is not smart I think.

Correct, that would be bad. Primarily because the browser won't be able to cache this (or rather it will cache it once for every page!). It will be slower and will use more bandwidth.

I would only consider defining CSS in the HEAD section of the page itself (which I assume is what you mean by "inline") if those CSS classes / IDs are only relevant on that one page and there is no possibility of it being reused. Otherwise the styles should all go in your external CSS file.