When to separate files to save bandwidth

I'm doing some optimising for my site and am trying to figure out just how big some inline code can be before it can justify having it's own file instead of being written inline. My guess on how to measure it would be that the amount of code (CSS or JS in this case) would need to be bigger than the HTTP packets sent and received to get a 304 response. Please ignore the fact that it's a good practice to keep styles and javascript out of the HTML page and think only in terms of browser performance. :)
Appreciate the answers so far but this is more theoretical than practical. The question is how big does some code need to be before a cached http request is smaller than downloading the code inline. Reasons for this could include mobile development where the biggest slowdown is extra http requests

以上就是When to separate files to save bandwidth的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏