How do you reduce page load time? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 29

How do you reduce page load time?

26th Feb 2017, 5:18 PM
Obaapa Ama AMPABEN-KYEREME
Obaapa Ama AMPABEN-KYEREME - avatar
55 Answers
+ 39
Reduce external resources.
26th Feb 2017, 5:41 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 39
compress CSS, minify your JS, compress images (use tech like gulp). it's good practice to put all styles in one file and compress it. that way the server loads the CSS once. and browsers nowadays cache everything so, that helps, mostly
27th Feb 2017, 6:48 AM
G. keng
G. keng - avatar
+ 23
with using AJAX framework. It allows you to update only the form you need, not the whole page.
10th Nov 2017, 3:17 PM
Ghena Ramascan
Ghena Ramascan - avatar
+ 11
Use Accelerated Mobile pages, optimize and compress/minify your files and images. For faster loads, you can also use a CDN such as Cloudflare or Amazon Web Services. Also place the <script> tag at the end of the page so that scripts keep loading and don't interfere with the loading of the page
2nd Mar 2017, 12:37 AM
Chirag Bhansali
Chirag Bhansali - avatar
+ 9
Too much Images and videos are the main cause of increased page load time, to check this you need to minimise the amount of media files contained in your page
1st Mar 2017, 8:00 AM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
+ 8
Made your javascript codes external and put the link at end of <body> Externalize also your css... and optimize your ressources: mainly your images files: set appropriate resolution, and compress them enough to get ligths files. If you need to handle lot of images on once page, you should be advised to optimize by making an unique multi-image, from wich you display some parts depending on element you want to style... This can be a good improvment applied to many little files as icons and other decorative stuff ;)
26th Feb 2017, 7:34 PM
visph
visph - avatar
+ 8
Most OS's have a limit setting for simultaneous connections you can make to a server. It's a client setting. Other than this all the obvious things that affect bit-rate and parallel operations apply: you need (server and client) less data, more bandwidth, more threads, a faster computer, less contention, simpler layout, fewer uncached dependencies, a simpler protocol, etc. Quite a lot of work also exists to make DOMs "finish" faster. Some continue in the background (AJAX, QUIC, ...) or... Libraries are almost permanently cached. Just use a global source, so the only thing that happens is: "Did <library> change? No? I'll use my local copy then." Linked versions *never* change, hence the browser command from Google to 'cache for 1 year'. SoloLearn might flush their cache, but that would be a 'safe default' accommodation for beginners.
28th Feb 2017, 8:59 PM
Kirk Schafer
Kirk Schafer - avatar
+ 6
(imagine in-code optimization) A post reminded me...to skip one round-trip to the server, append the first slash - also after any 'folder' (otherwise the browser requests which folder to start on...which for most sites is root: /) https://www.google.com 2 trips https://www.google.com/ 1 trip Specifying https:// when you know you want it: skips protocol discovery (the visit to http: port 80, then 30x redirect -- or worse, meta/page redirects -- to https: port 443) DNS misconfiguration​ can also really mess up performance. If you intend to configure DNS, practice, learn, get it right.
6th Mar 2017, 2:24 PM
Kirk Schafer
Kirk Schafer - avatar
+ 5
with Ajax, which permit you to reload only the updated part
4th Mar 2017, 10:50 PM
Ghena Ramascan
Ghena Ramascan - avatar
+ 4
Google PageSpeed Insights API* will give you automatic suggestions: https://developers.google.com/apis-explorer/#s/pagespeedonline/v2/ * "Analyzes the performance of a web page and provides tailored suggestions to make that page faster."
4th Mar 2017, 11:51 PM
Kirk Schafer
Kirk Schafer - avatar
+ 2
adding CSS before d ending of <head > and stript before the ending of <body>
1st Mar 2017, 7:04 PM
rossi
rossi - avatar
+ 2
compress css , JavaScript and minify HTML webpages make use of static web rather than dynamic PHP . reduce HTTP requests as much as you can optimize all images present on webpage. optimize database and sql queries use GZip on server enable caching on webpages make use of CDN make sure u r using external frameworks by uploading them to your own server. instead of using other links
2nd Mar 2017, 11:04 AM
Abhishek yadav
Abhishek yadav - avatar
+ 2
use cached javascript files
4th Mar 2017, 8:16 AM
Dave
Dave - avatar
+ 1
Reduce the amount of large items and files
26th Feb 2017, 7:16 PM
SUNDUS HUSSEIN
SUNDUS HUSSEIN - avatar
+ 1
compress css, clean all codes but most important compress your images and reduce the external sources at minimum, use svg instead pngs or jpgs. always less is more!
1st Mar 2017, 10:56 AM
Pablo Zirilli
Pablo Zirilli - avatar
+ 1
Optimize your js and css files! Delete unneeded files from loading web page
1st Mar 2017, 11:01 AM
Lord Centillion
Lord Centillion - avatar
+ 1
Try to keep the code optimized. Use optimized images. Avoid unnecessary codes and variables. Look at the Google page source they didn't even write the code in extra spacing to reduce the page load time. If you are using images first of all make them web usages in Photoshop to get the least size.
3rd Mar 2017, 1:00 PM
Pranjol Dutta
Pranjol Dutta - avatar
+ 1
Link your scripts externally and place them just before the closing body tag. This reduces delays in waiting for pages to render
5th Mar 2017, 2:20 AM
Godric Oscar Dolphine
Godric Oscar Dolphine - avatar
+ 1
Delete unused code, minimize (compess) your code and use inline styles in head tag of your html files! my pages have all a 100/100 scoring :-)
5th Mar 2017, 12:51 PM
Julian Johannsen
+ 1
A few things you can do I haven't seen mentioned, now broken down in more posts as it was too long: 1) Browsers only download 2 - 4 things simultaneously from a host. To get around this limit create your own mini CDN. Add a subdomain (or more) to serve images, css, fonts and JavaScript. That way the browser can download as many things simultaneously as it wants to, if you use enough subdomains (4?). For optimum results pick one of the below options: a) Use a different domain to host your CDN on. b) Don't use www.yourdomain.com but only yourdomain.com for your site and then serve content from img.yourdomain.com, css.yourdomain.com, etc. By using one of those options, when the browser requests a file from your CDN (like a css file) it will only get the file it requested. If it is served from the same domain as your html (or from any subdomain if you use www.yourdomain.com) it will get both the file AND cookies with every single request. If you have a lot of small files the cookies could be bigger than the files they come with..
6th Mar 2017, 4:03 AM
Thomas Toft
Thomas Toft - avatar