138

Sometimes when I am browsing the web, among the hostnames that fly by in the statusbar is one that includes gstatic.com as the base domain. I can't navigate to http://gstatic.com to gain any more information. All I get is a Google page that says

The requested URL / was not found on this server.

So I imagine that gstatic.com has something to do with Google. Whatever it is, it seems to take forever when I am browsing a page that references gstatic.com.

4 Answers 4

138

Google has off-loaded static content (JavaScript code, images and CSS) to a different domain name in an effort to reduce bandwidth usage and increase network performance for the end user.

  • increases performance by increasing, in theory, the number of connections the browser can use, by default, most browsers will only make two connections to a single server. While this is configurable, most users don't bother, so having content come from multiple domains, it can open two connections for every domain the site uses. This loads the content into the users browser faster.

  • decreases bandwidth by disabling cookies and other HTTP headers for the gstatic.com domain. Believe it or not, disabling headers greatly reduces bandwidth usage, especially if a page uses a lot of static files.

  • static content can be offloaded to geographically diverse CDN servers. Google can push all the content to servers that are nearest to you. This is probably more applicable to a normal corporate site, as Google does a great job of pushing everything to a datacenter closest to you. But for a normal company, you could split out your dynamic content and your static content and then pay a CDN provider to host your static content, reducing your corporate datacenter's bandwidth usage, while improving load times for your user.

7
  • 1
    great, I forgot the cookies
    – Jader Dias
    Nov 2, 2009 at 23:48
  • 13
    It's not ALL static. There is a subdomain "csi.gstatic.com" that is used for some sort of logging. No resources are returned, and sometimes it takes a LONG time (over 30 seconds) for the URI to return just empty content.
    – Portman
    Dec 2, 2009 at 13:20
  • 11
    For what it's worth, the Stack Overflow family of sites does the same thing with sstatic.net. See Jeff's blog post: blog.stackoverflow.com/page/12
    – ale
    Dec 30, 2009 at 20:48
  • 5
    My pageload always gets slower at gstatic lookup! :( Oct 21, 2013 at 6:16
  • 2
    The link above is dead. blog.stackoverflow.com/2009/08/a-few-speed-improvements
    – Sankalp
    Feb 17, 2016 at 17:07
30

gstatic.com is a cookieless domain to deliver static content for Google. See this article for more:
Best Practices for Speeding Up Your Web Site - Use Cookie-free Domains for Components

When the browser makes a request for a static image and sends cookies together with the request, the server doesn't have any use for those cookies. So they only create network traffic for no good reason. You should make sure static components are requested with cookie-free requests. Create a subdomain and host all your static components there.

If your domain is www.example.org, you can host your static components on static.example.org. However, if you've already set cookies on the top-level domain example.org as opposed to www.example.org, then all the requests to static.example.org will include those cookies. In this case, you can buy a whole new domain, host your static components there, and keep this domain cookie-free. Yahoo! uses yimg.com, YouTube uses ytimg.com, Amazon uses images-amazon.com and so on.

Another benefit of hosting static components on a cookie-free domain is that some proxies might refuse to cache the components that are requested with cookies. On a related note, if you wonder if you should use example.org or www.example.org for your home page, consider the cookie impact. Omitting www leaves you no choice but to write cookies to *.example.org, so for performance reasons it's best to use the www subdomain and write the cookies to that subdomain.

3
  • 3
    But It's making it slower than it was before for many users.
    – red-o-alf
    Aug 22, 2015 at 15:08
  • 2
    I don't see how? Aug 22, 2015 at 16:08
  • 4
    It hangs. How else?
    – red-o-alf
    Aug 22, 2015 at 17:42
15

If you're like me, you probably notice the gstatic domain because your browser is paused waiting for a resource.

If the domain you're seeing is

csi.gstatic.com

then note that this is NOT a static resource. It's some kind of internal logging (much like Google Analytics). If you do a Google search for csi gstatic you'll see that many people wait up to 30 seconds for this URI to be processed by Google.

Google, for their part, has never (to my knowledge) publicly mentioned csi.gstatic.com/csi.

5

gstatic.com is a google owned domain where it hosts its static content, mainly images. The main purpose of this domain is for improving the performance of other sites, and not to build a site. One of the motives of the existence of such a domain is because of the main browsers limitations regarding simultaneous downloads from a single subdomain. There was a version of the main browsers that limited the simultaneous downloads to 4. Web performance research pointed that if you created up to four subdomains the speed of page loading for pages with much static files would improve.

1
  • 3
    In our case we are using maps.googleapis.com and the request to csi.gstatic.com return an empty / not existing image (length 0). The GET request to csi.gstatic.com contains parameters like csi?v=2 s=mapsapi3 action=apiboot size=800x240 maptype=m. So in our case it certainly looks like it is about tracking how we use maps. I am uncertain about your statement The main purpose of this domain is for improving the performance of other sites Could you add information and details to back this up?
    – surfmuggle
    Jul 14, 2015 at 10:43

Not the answer you're looking for? Browse other questions tagged .