doulang9953
doulang9953
2018-03-28 19:01

对服务器的查询(图像加载)

已采纳

I have a simple question which I don't understand completely. So suppose I have the website on shared hosting, I have the main page which has 2 css files 2 js files, 35 images.

so question in when user open this page server must handle 'get query' + 2 queries for css + 2 queries to js + 35 queries to load images so we have 40 queries which we need to load a page?

So if we have another server for images, the main server could process more users which open web site?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • dongle7882 dongle7882 3年前

    so question in when user open this page server must handle 'get query' + 2 queries for css + 2 queries to js + 35 queries to load images so we have 40 queries which we need to load a page?

    Yes. However note that with proper configuration of your web server, subsequent hits from the same browser will be cached.

    So if we have another server for images, the main server could process more users which open web site?

    Generally, yes. Moving images to a separate host is a popular way to distribute load. Note that if you're not actually experiencing problems right now, then it's probably too early to worry about how you're going to implement a solution, especially if your content is all static files.

    点赞 评论 复制链接分享