Thursday, August 21, 2014

But Google what about mobile phones that do not support Javascript?

In the global device market, there are still between 0.2% and 5.4% of phones that do not support Javascript, at least in these set of countries according to this site.

In case your mobile website falls within this set than what do you do when you want to optimize CSS delivery by deferring the loading of some CSS but still serving the complete CSS to non-Javascript websites?

Deferring your CSS is when you basically load style-rules that are responsible for rendering content above-the-fold inline within the <head></head> section of your page. The rest of the CSS that is responsible for below-the-fold content you would load after. The problem is that the recommendation snippet given here by Google only takes Javascript enabled sites into consideration. So what if you have to take non-Javascript mobile devices as well into account and in doing so have the best of both worlds? Well, one way to achieve this is to add your CSS-link in a <noscript></noscript> tag before the closing </body> element, like so:

<noscript>
  <link rel="stylesheet" href="my-external-styles.css" type="text/css"/>
</noscript>

It’s that simple. That way you will make sure that the CSS-link only gets requested by the browser when Javascript is not supported and will not be requested twice. I’ve chosen to add the tag within the <body></body> tag to be backwards compliant with HTML 4.01 and HTML 5, see the spec here for more info.

Any questions, suggestions, remarks, drop a comment below!

27 comments:

Innocent Saqib said...
This comment has been removed by the author.
Sanowar Hossain said...

Thank you so much for writing this helpful post.Thanks again for share with us. Desh Cam Centre

Chrise Wrot said...

Testro T3 guys are getting a bigger of their personal home What hand physical games entail are gentle mages which can be completed to the entire shaft of the . these mages, when finished efficiently, can make the tissue and ligaments that the is product of longer and wider.
http://www.drozhealthblog.com/testro-t3-uk/

melissa scruggs said...

Testx Core items will permit better blood stream to your affection shaft. This will expand the size and length however very little.
http://www.usadrugguide.com/testx-core-review/

Master Dada said...

I read your post its great thanks. Waiting for more new update.
Car Dvd

Barbara Isaac said...

CLA Safflower Oil The apparatuses that you require include: well ordered guide on the most proficient method to get thinner, stage to connect with different clients of the program, and inspiration to prop you up.
http://xtrfact.com/cla-safflower-oil/

Lois Austin said...

Dermagen IQ Comprehend this is a billion dollar industry and there Dermagen IQ for UK are numerous organizations out there that utilize splendid advertisers to get your consideration and impact you to buy their items.
http://www.usadrugguide.com/dermagen-iq/

ella mayton said...

Rapiture Muscle Builder The body couldn't adjust to regular lifting without the vitality to back it up with. Most dietary cognizant people hold back to make Rapiture Muscle for Spain starch admission
http://xtrfact.com/rapiture-muscle-builder/

Aron_ Seo said...

Know who is calling with reverse phone lookup. ... Reverse phone search. skip tracing tools

Edna Sale said...

Perlelux individuals Perlelux who have officially attempted Perlelux Perlelux For Canada items you are mulling over Perlelux purchase would help an awesome.
http://www.drozhelp.com/perlelux/

Edna Sale said...
This comment has been removed by the author.
Coleen Redd said...

Sustenance is the thing D BAL Max that will enable the body to repair. Repairing speedier will enable you to fabricate detectable muscle picks up.
http://xtrfact.com/d-bal-max-review/

Single Head said...

Nice
Best Single Din

Lauren Graham said...

A way of life that is Slimfire Forskolin significantly more beneficial than either Forskolin extraordinary independent from anyone else would be.
http://supplementdigestdog.com/slimfire-forskolin/

Dianna Larson said...

We have to spend some Xtrfact exertion in understanding medicinal services and dealing with how we consider it.
http://xtrfact.com/

sheilajwenger said...

To be littler than the normal Pure CBD Oil house, they do take to such an extent, and now and then more opportunity to review.
http://www.drozhealthblog.com/pure-cbd-oil/

sheilajwenger said...

The same is valid for Pure CBD Oil generally cabins. We every now and again hear It's just a little cabin or It's just a portable for what reason would it be advisable for it to cost as much as a house.
http://www.drozhealthblog.com/pure-cbd-oil/

Aron_ Seo said...

Perhaps you have just received a phone call, but you don't recognize the number. If you'd like to investigate further who just called you, there's a specific search technique you can use to look up where this number might have originated from, and that's called a reverse phone lookup. missed call

Carolyn Berns said...

Wherein the impact is Dermagen IQ seen best till the time your face gets to Dermagen IQ for UK meet water, the effect that a natural cream has are long lasting and everlasting.
http://www.drozhealthblog.com/dermagen-iq/

Shelly Hastings said...

Perlelux A few fixings in a hostile to maturing healthy skin treatment are great and normal, yet are not as viable as taking a vitamin, on the grounds that the air will make them free Perlelux for Canada strength.
http://www.usadrugguide.com/perlelux-ca/

Kristen Pullins said...

Nitridex Thick regrowth is unprecedented and neither one of the medications can regrow hair in totally uncovered territories.
http://supplementdigestdog.com/nitridex/

Kristen Pullins said...

Nitridex Early mediation, when diminishing is first seen and hairs are not completely scaled down, produces the best outcomes.
http://supplementdigestdog.com/nitridex/

Stacey Suarez said...

Zylix Plus Accordingly no enlistment of disease development has been connected to these lasers. The danger of eye damage is nearly.
http://www.drozhealthblog.com/zylix-plus/

Stacey Suarez said...
This comment has been removed by the author.
anam mugl said...

great post thanks for sharing news

mohammed ababneh said...


That’s a very great article I like it


https://real-estate-real-property

diet plan said...


keto slim rapid diet keto slim powder reviewsfat-burner achieves significant fat loss through a very simple approach. Once you begin using it, it will immediately start Ketosis and help you maintain it for as long as possible. keto slim plus keto slim price
https://www.smore.com/39qfa-keto-slim-reviews-how-does-it-work