摘要:
1.使用CDN 内容分发服务器会根据用户的位置选择最近的服务器响应用户的请求,静态资源放在CDN的性能将提升20%左右。2.设置Expires和Cache-Contral头 将静态资源的过期时间设置一个遥远的日期,那么这将是304请求 将动态资源设置一个Cache-Contral来帮助浏览器有条件的请求 这个时候我们的静态资源就要带上版本号了,以便于更新的时候可以获取到最新的代码3.配置ETags a) 客户端请求一个页面Page A b)服务器返回Page A 连同ETags一起 c)客户端接收到Page A 并且缓存Etags d)客户端再次请求Page A ,带上了缓存中... 阅读全文
摘要:
go version 1.1.2 For example you need to install the webscoket pakeage try go get code.google.com/p/go.net/websocket catch $GOPATH no set? that you need set the GOPATH in the system environment variables and this path should in golang directory no Mercurial? download it now try go get ... again. f.. 阅读全文
摘要:
/** * @description format the time * @author xf.radish * @param {String} format The format your want * @param {String} lang The language * @return {String} Return the format time * @example * var time = new Date(); * time.format('YYYY MMM dd , hh:mm:ss www','e... 阅读全文