Statics Archives

0

Does anyone know how to use statics files to improve site performance and speed?

How large eco-comers use:

static1.netshoes.net/resources/lind/netshoes/lindd.min.js
static1.netshoes.net/3470.1.1/assets/css-min/theme-common/structure.css
http://static1.netshoes.net/Produtos/88/N03-0046-188/N03-0046-188_zoom1.jpg?resize=74:74

They use images, scripts, and css.

Does anyone know the correct way to use this technique?

    
asked by anonymous 29.07.2017 / 21:50

1 answer

0

First you have to know why there is performance improvement when using subdominio.site.com .

I believe the advantages are:

  • CDN:

    The static.site.com is on another server, probably a CDN, specific to distribute this type of static content, the client will connect to the nearest server.

    While www.site.com is still processed by slow PHP for example.

  • Avoid unnecessary cookie and headers:

    Static files do not bind to cookie in normal situations. If you have 500 bytes of cookies stored in the entire domain and have 10 static contents that need to be loaded, the client will send 5000 additional bytes without any reason.

    Now, if such 500 cookie bytes are restricted to www.site.com , it will not be sent when you get static.site.com/js.js , that will save you 5000 bytes of unnecessary information.

    This is also part of "Best Practices for Speeding Up Your Web Site" .

  • In order to gain some performance using sub.dominio.com you need to set cookies for only the main site, not including the subdomain, and you can also get some CDN service for it.

        
    29.07.2017 / 23:17