Stopping cookies being set from a domain (aka “cookieless domain”) to increase site performance

后端 未结 4 683
暗喜
暗喜 2020-12-13 02:52

I was reading in Google\'s documentation about improving site speed. One of their recommendations is serving static content (images, css, js, etc.) from a \"cookieless domai

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-13 03:48

    Serving resources from Cookie-less domains is great technique if you have more than 5 of combined images/styleshees/javascript then its benefit is noticeable and is gain even with that extra DNS lookup. Also its very easy to implement :). There's how you can easily set it in web.config[system.web] and have completely cookieless subdomain (unless its cookie-fested by Google Analytics but thats easily curable as well) :)

    
    

    To give you example

    
    

    This will set .ASPXANONYMOUS cookie only on www.domain.anyTLD but not myStatic.domain.anyTLD ... no need to create new pools and stuff :).

提交回复
热议问题