doubt about performance [closed]

-1
I'm setting up a small Framework of design CSS and JS to standardize the system I'm working on.

My question is how to get the best performance.

I've done a lot of things like enabling the cache , organizing the code and so on ...

However browsers on average make 6 requests at a time to the server. So I thought I'd put all CSS and JS into 2 files. And then make the minified version of them.

So the system only makes 2 requests and loads all CSS and JS into the cache.

Should I do this, or create multiple CSS and JS?

    
asked by anonymous 28.12.2016 / 01:57

1 answer

1

Join and minify

Extremely recommend joining the Css and JS as little as possible. Browsers can do 6-8 requests per second, the more files you have, the more block you have in the download.

After joining CSS's and JS's I recommend to minify it on sites like:

link

link

NOTE: joining the jquery file with other files can be problematic, if it does, put jquery on CDN;

NOTE: When you can not join files think of the CDN, they are always a great way to load files.

Of course there are tools to automate these processes.

Compress Gzip

If you are using IIS link Otherwise look for "Enable Gzip Header Compression"

Image size.

Always check the size of the images, they can usually be the big villain. I have seen websites with images in the 900kb.

Use a testing tool Finally, the best thing is to use some tool to test performance and check if you hear improvements and what you have to do, Chrome itself has great tools. If you want to recommend a simple and effective link

    
28.12.2016 / 13:15