by austincheney · 8y ago · 0 comments
Everything it mentions in prefer for WWW can be solved by a combination of static IP and CDN. My site's domain, for example, has a domain with a static IP and the site is served by HTTPS. Certificate resolution for the HTTPS goes to CloudFlare which also serves as a CDN for everything retrieved from the domain. CloudFlare provides firewall and security options as a feature of its CDN capabilities.
Because I am already solving for all the DNS and application concerns mentioned by the article I choose to use the more sane approach and simply drop use of a default subdomain.
EDIT:
I also detest cookies. They can store virtually nothing at 4kb per domain and the cookie API is horrible. Instead I use localStorage for all storage concerns and share explicitly anything that needs to be shared via XHR, which currently is nothing.
And regarding Cloudflare: Terminating your TLS session on a third party provider's server also has it's downsides.
What don't you like about it?
https://developer.mozilla.org/en-US/docs/Web/API/Document/co...
Compare all that madness to the localStorage API:
localStorage.myName = "string up to 5mb";
Attempting to delete a cookie makes me want to abandon coding. Removing from localStorage is as easy as: delete localStorage.myName;You should only be using server-side APIs for cookie management. Many good ones exist.
Reference: https://www.owasp.org/index.php/HttpOnly
No. I will use any string I want of any size I want. Cookies are a relic of an archaic age for the web.
Cookies only continue to be used because many server based web applications haven't figured out a modern way for managing sessions.