Quote:
Originally Posted by Sojan Babu
What methods would you apply for decreasing the loading time of a website?
|
Hi there,
There are a number of possibilities, with some degree of diminishing return:
- Caching -- often your application server will have significant latency, using a reverse proxy such as Varnish can shave off a few hundred milliseconds
- CDN -- offloading static assets to the edge reduces the time to serve them, especially for clients that are far away from your host
- Domain sharding -- browsers load only a certain number of assets at a given time, adding more domains (e.g. static1, static2, etc.) can increase your throughput
- Compression -- most browsers support gzip so your web server should compress outgoing assets, similarly you can minify CSS, JS and images
- Asynchronous JavaScript -- most script tags are blocking which means the browser won't render the DOM until all the JavaScript has been loaded -- marking some as async can improve the perceived speed
- Critical path CSS -- by determining which styles are used above the fold when the user first loads the page you can inline those and load others asynchronously
A lot of these can be automated by tools such as Grunt or Gulp. You can also look at Google Page Speed which can be installed on Apache or nginx.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. , To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|