The Stack Overflow podcast is back! Listen to an interview with our new CEO.
2 added 273 characters in body
source | link

So I have a relatively big CSS file. I thought about doing the following, splitting it to 3 parts:

  • 1st part will have the main selectors that are needed to run on the main page that gets the biggest traffic.
  • 2nd part will have CSS for the rest of the pages
  • 3rd page will have all the screen size dependent set up intended for mobile devices to have responsive pages

I am running my static files off a CDN and I would put each of these parts to a separate subdomain to have them all downloaded faster than one file.

Do you think this is a good way of doing that?

EDIT: since I didn't make clear, I am using CDN service on subdomains to serve all static content, so there are 5 subdomains that I use and they all are on CDN. Each of them is used to serve a number of files: CSS, JS, JPG, PNG, etc. DNS lookups are being made anyways.

So I have a relatively big CSS file. I thought about doing the following, splitting it to 3 parts:

  • 1st part will have the main selectors that are needed to run on the main page that gets the biggest traffic.
  • 2nd part will have CSS for the rest of the pages
  • 3rd page will have all the screen size dependent set up intended for mobile devices to have responsive pages

I am running my static files off a CDN and I would put each of these parts to a separate subdomain to have them all downloaded faster than one file.

Do you think this is a good way of doing that?

So I have a relatively big CSS file. I thought about doing the following, splitting it to 3 parts:

  • 1st part will have the main selectors that are needed to run on the main page that gets the biggest traffic.
  • 2nd part will have CSS for the rest of the pages
  • 3rd page will have all the screen size dependent set up intended for mobile devices to have responsive pages

I am running my static files off a CDN and I would put each of these parts to a separate subdomain to have them all downloaded faster than one file.

Do you think this is a good way of doing that?

EDIT: since I didn't make clear, I am using CDN service on subdomains to serve all static content, so there are 5 subdomains that I use and they all are on CDN. Each of them is used to serve a number of files: CSS, JS, JPG, PNG, etc. DNS lookups are being made anyways.

    Tweeted twitter.com/#!/StackWebmasters/status/412950905122992128
1
source | link

Splitting big CSS file into parts for quicker loading

So I have a relatively big CSS file. I thought about doing the following, splitting it to 3 parts:

  • 1st part will have the main selectors that are needed to run on the main page that gets the biggest traffic.
  • 2nd part will have CSS for the rest of the pages
  • 3rd page will have all the screen size dependent set up intended for mobile devices to have responsive pages

I am running my static files off a CDN and I would put each of these parts to a separate subdomain to have them all downloaded faster than one file.

Do you think this is a good way of doing that?