cookieless domain
2016-01-22 02:13
417 查看
概述
什么是cookieless domain?虽然名字中带有cookie,其实完全可以不使用cookie。这只是一种将网页中静态的文本,图片等的域名和主域名相区别开的方法。主域名难免会使用到cookie,如果所有的资源(js,css,img等)都是来自于主域名,那么这些资源也会携带主域名的cookie。这样其实增加了很多不必要的流量,要知道性能都是从细节上优化的。cookie相信大家都十分熟悉了,不了解的可以去谷歌,百度一下,这里就不多做讲解了。
如何启用cookieless domain?
申请一个新的旁路域名,将你的外部资源与主域名分开。然后再将这个旁路域名禁用cookie,这样也就最大程度少节省了字节。上图
如下是天猫域下的cookie,可以清楚地看到www.tmall.com让我们再看这个页面的js,css,img等外部资源
如图,所有的外部资源都不是主域名的。
相关文章推荐
- ssh 链接服务器出现 Write failed: Broken pipe
- su root: Authentication failure的解决
- P22 (*) Create a list containing all integers within a given range.
- P22 (*) Create a list containing all integers within a given range.
- Ubuntu 14.04 Desktop的Raid1安装总结
- 2016 Winter Training Day #1_C题_hdoj 1009(贪心)
- 2016 Winter Training Day #1_G题_codefcrces 349A(贪心)
- 2016 Winter Training Day #1_F题_codefcrces 507A(贪心)
- 2016 Winter Training Day #1_E题_codefcrces 514A(贪心)
- 2016 Winter Training Day #1_D题_codefcrces 432A(贪心)
- org.hibernate.AssertionFailure: null id in com.you.model.User entry (don't flush the Session after a
- Cannot add or update a child row: a foreign key constraint fails
- 2016 Winter Training Day #1_B题_codefcrces 588A(贪心)
- 2016 Winter Training Day #1_A题_codefcrces 230A(贪心)
- CodeForces 164A Variable, or There and Back Again 搜索
- 最新Google Gmail邮箱登陆不了解决方法
- RETAIN语句
- 美国末日AI System设计分享
- width、clientWidth、offsetWidth、scrollWidth、availWidth
- Examine the following statement that is used to modify the primary key constraint on the SALES tabl