JavaScript 篇幅略多 ★★★
读完时间:2020 年 8 月 20 日
出版时间:2020 年 1 月
"深入理解TypeScript – [澳]Basarat Ali Syed 著 / 郭文超 何小磊 柳星 徐野 译"继续阅读
JavaScript 篇幅略多 ★★★
读完时间:2020 年 8 月 20 日
出版时间:2020 年 1 月
"深入理解TypeScript – [澳]Basarat Ali Syed 著 / 郭文超 何小磊 柳星 徐野 译"继续阅读
在日常的前端开发中,倘若想验证一个业务功能正向性,需要针对部分用户进行灰度实验。
用一个轻量级的 H5 页面做流量中转,收集完用户信息后使用 Ajax
来请求后端接口来判断一个用户是否命中灰度,再通过 location.href
或 location.replace
来做相应的页面跳转。
优点:
缺点:
示例:
ajax.get('https://getwhich.com').then( abValue => { let jumpUrl = 'https://default.com' if (abValue === 'iAmExp') { jumpUrl = 'https://exp.com' } location.href = jumpUrl } )
"使用 Golang & MurmurHash & JsonLogic 实现前端资源灰度分流"继续阅读