Current time: 10-22-2019, 04:30 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting up a separate domain just to "serve static content from a cookieless domain"
03-05-2013, 08:49 AM
Post: #1
Setting up a separate domain just to "serve static content from a cookieless domain"
Hi guys,

I'm making progress optimizing our website. We have a Wordpress site with W3TC and we use MaxCDN. One thing that I still have to solve is that our static content, like images, ARE hosted with a CDN through cdn.ourdomain.com (and cdn2.ourdomain.com etc.). But we have cookies set at ourdomain.com and because of this the subdomains have cookies too.

I understand that the only way to solve this is to get a separate domain just for the static files, which is reasonably common it seems. (It's undesirable for us to move the wordpress site to a www. subdomain.)

This is where my noobness comes in. I don't know how to go about this exactly.

We need the extra domain, obviously. But do we need extra hosting? With W3TC I can set up the CDN without actually moving the files to a subdomain. It does that automatically somehow. Does that mean I can set everything up with a separate domain and do the same thing, or do I actually need to buy separate hosting and go about it differently?

Any guidance at all would be appreciated.

I hope my questions are clear, but my knowledge in this area is lacking and this makes my thinking cloudy.
Find all posts by this user
Quote this message in a reply
03-06-2013, 12:45 AM
Post: #2
Setting up a separate domain just to "serve static content from a cookieless domain"
Hi Gnusmas,

Yes, you have to spend some (very little) extra money for a further domain, but you can use the same server/webspace. The IP does not need to be different.

Cheers,
Markus
Visit this user's website Find all posts by this user
Quote this message in a reply
03-09-2013, 01:08 AM
Post: #3
RE: Setting up a separate domain just to "serve static content from a cookieless..."
How big are your cookies? Unless they are insanely large I wouldn't spend a whole lot of time working on it unless you have already optimized the rest of your site and there's nothing left to do (and even then it may not be worth it). Odds are that any improvement will not even be measurable.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-15-2013, 09:30 PM
Post: #4
Setting up a separate domain just to "serve static content from a cookieless domain"
I know it's minor thing. But I want to do it anyway because it may cause a small improvement, it's recommended and I get punished for it in my pagespeed scores... lol.

I just exported cookies to a .txt file with FireBug. I don't know if this is the best way to measure it, but the file size was 2.11 kB. Is that large?

We already have the url for the external domain now. Which was probably less than $10/year so that's not an issue at all.
Find all posts by this user
Quote this message in a reply
03-16-2013, 05:12 AM
Post: #5
RE: Setting up a separate domain just to "serve static content from...
Fair enough. Just make sure to do some testing to make sure the extra DNS lookup isn't costing you more than the benefit you get from removing the cookies.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-24-2013, 12:58 AM
Post: #6
Setting up a separate domain just to "serve static content from a cookieless domain"
Dear Pat,

You have mentioned recently that for the DNS Lookup for a test with 'DSL' connection you have included an extra 50 ms delay.
Did you do that for the Initial Connection as well or is that (in all connection possibilities offered) the connection time without extra time added?

The reason why I am asking is because I am considering stopping to use the cookie-free domain fns1.de for static content - so doing the opposit of Gnusmas' intention.

Our cookis on http://www.finanznachrichten.de have a size of ca. 900 Bytes (a bit less if not loged in, a bit more if logged in the watchlist).

Looking at this test result and considering that all current browsers handle (at least) 6 connections with the same hostname (according to http://www.browserscope.org/?category=network&v=top ), I am thinking that the DNS Lookup + the Initial Connection of fns1.de could cost more time than receiving a 900 Bytes cookie in the request of the client.

Currently I am loading static files from fns1.de

Test examples:

* IE8 Dulles native (ca. 100 ms for the Initial Connection):
http://www.webpagetest.org/result/130323...2/details/

* IE8 Frankfurt native (Initial Connection within some milliseconds):
http://www.webpagetest.org/result/130323...2/details/


What do you think?

Kind regards,
Markus
Visit this user's website Find all posts by this user
Quote this message in a reply
03-27-2013, 12:17 AM
Post: #7
RE: Setting up a separate domain just to "serve static content from a cookieless..."
The 50ms is add round trip latency for all network round trips (at the packet level) so it's not limited to DNS. The initial connection, request time and the ack's while downloading content will all include the delay.

Looking at the connection view waterfall, hardly any content is served from the main domain (or the s. version) so you're not going to see any improvement by moving the static requests to a different domain (unless that also happens to be a CDN).
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)