My app is just 15 pages and does not contain a lot of code on the client side. The website is hosted with modulus from Amsterdam and I call it from Germany. It has an awful long loading time and I was the only one calling the website. The server stats: 154 requests transfered 9.14mb avg response 4.31ms
Most of the loading time seems to be vendor.css and vendor.js. As well as the css and js of the application.
What I already do:
- load css first
- try to load not needed js later like socket.io, google analytics but it is an Angular App so I need some JS in the head
- uglify & minify my JS & CSS
- concat CSS, JS to reduce requests
- use sprites for small images which are used twice+
- load diff. image sizes based on the screensize
- use angular template cache for HTML (this adds a bit to initial loading time)
- and probably some things I forgot to mention
Question 1
Why is there a gap in the waterfall, sure these are external scripts but it could already load the images in that time.
Question 2
Will loading the external JS from CDNs reduce a lot of the loading time? I thought about s.th. like this: https://www.npmjs.com/package/gulp-cdnizer but I like it to have a similar prog. in dev and prod. Also my gulp processes are very complex, I really try to avoid restructuring too much there.
Question 3
How are things like gzip combineable with angular template cache?
Question 4
What else can I do to reduce the initial loading time,the loading time in the app is good.