Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I inline CSS & JS in mobile sites to save bandwidth?

Is there a reason not to inline CSS & JS when I make a mobile-ONLY site, to save bandwidth?

like image 331
ilyo Avatar asked Dec 01 '25 08:12

ilyo


1 Answers

The only possible benefit I can think of is a couple less HTTP requests, but you totally give up the benefits of having the files cached if you do so.

Caching is a good thing and it saves bandwidth, so I can't see why you'd want to lose that advantage.

Besides that (not related to performance), maintenance will be a nightmare with everything inline, as it would be with any site.

I wouldn't be the least bit surprised if there were even more compelling reasons not to.

Use separate files.

like image 93
Wesley Murch Avatar answered Dec 03 '25 23:12

Wesley Murch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!