Webpage optimization

I am creating a new dynamic site for testing and studying web optimization ... Site Index

For html, css, js (except jquery-min related to google server files) I created a php file that merges more files, removes unused spaces and compresses them with gzip: compressed css - compressed js

if(extension_loaded('zlib')){ob_start('ob_gzhandler');
/*...php code to read files and remove comments/spaces*/
if(extension_loaded('zlib')){ob_end_flush();}

For basic images, I dumped each image into one

For the facebook button, I replace the iframe after loading the page using jquery, I would like to do the same with adbrite advertisements, but I don't know how .. If I try to replace or paste the code in html after loading, it will disappear and remain only in adv ...

Can anybody help?

Can you tell me that everything is fine with me (for optimization) and where I can improve

Thank...

+3
source share
2 answers

This is a good start, but you should not compress anything dynamically. This is too expensive and will end up being slower than delivering content without compression.

Use gzip / deflate and compress javascript files with a minifier like YUI , Google compiler or uglifyjs to name a few. Serve such files.

A good tool for automating all of the above processes (and even more) is Apache ANT .

supplyJS.

+2
0

Source: https://habr.com/ru/post/1790968/


All Articles