---
title: "通过实验，整理了部分主流手机浏览器的并发请求数"
author: "Surmounting"
date: "2020-01-31T14:39:13Z"
tags: []
categories: ["Web前端"]
slug: "untitled"
draft: false
lastmod: "2020-01-31T14:39:13Z"
id: 2512203
url: "https://surmounting.iteye.com/blog/2512203"
---

网上未见针对移动端的浏览器并发数统计，可见的帖子数据全部来自于 StackOverflow 关于主机浏览器的一篇描述。  
所以，设计了实验，探测了部分手机浏览器，对同域的并发访问量。

   手机浏览器 操作系统 一次并发请求 OPPO Android 12, 12, … Chrome Android 6, 6, … WeChat Android 28+ WeChat iOS 4, 4, … QQ iOS 4, 4, … Safari iOS 4, 4, …

以下是实验程序

服务端（Java）

```
static private final AtomicLong SEQ = new AtomicLong(0);

@RequestMapping(value = "sleep/{s}", method = GET)
public Result<Long> sleepForSeconds(@PathVariable("s") int secondNum)
{
	long index = SEQ.incrementAndGet();
	try { Thread.sleep(secondNum * 1000); }
	catch (InterruptedException iex) { }
	Result<Long> result = new Result<>();
	result.setData(index);
	result.setSuccess(true);
	return result;
}
```

 前端（JavaScript with jQuery）

```
<div id="area_display"></div>
<script>
var nowInMillis = new Date().getTime();
for (var i = -1; ++i != 28; )
{
	$.get(apictx + '/try/sleep/4?t=' + nowInMillis + '_' + i).done(function(result)
	{
		var html = $('#area_display').html();
		html += result.data + '(use ';
		html += new Date().getTime() - nowInMillis + 'ms)<br />';
		$('#area_display').html(html);
	});
}
</script>
```

 本文还发表于在其它网站

CSDN ：https://blog.csdn.net/ShaneLooLi/article/details/104123946

中国开源社区：https://my.oschina.net/shane1984/blog/3162224

51CTO ：https://blog.51cto.com/shanelooli/2468681