Home Forums Basel support forum HTML too heavy

HTML too heavy

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #48123

    Giulio
    Participant

    Hi there, I’m writing you because our HTML became really heavy and we need to reduce its weight. What do you suggest to do it? Can you take a look to our home page please? We have a lot of raws in Global CSS for example.

    #48156

    Artem Temos
    Keymaster

    Hi,

    If you don’t like the custom CSS in the source code, you can move it to the style.css file in the child theme. To optimize the HTML delivery we suggest you to use Gzip compression on your server and also try to set up some HTML minifier. This function can be enabled with W3 Total Cache plugin.

    Regards

    #66541

    Giulio
    Participant

    I would to do it. But how can specify Global Custom CSS, Custom CSS for desktop, etc. in the same file?

    #66553

    Artem Temos
    Keymaster

    You can use CSS Media Queries for this purpose. Here is a tutorial that should help you https://www.w3schools.com/css/css_rwd_mediaqueries.asp

    #89042

    Giulio
    Participant

    Could I have an improvement about the performance if I would use the style.css with child theme instead of the Global CSS – about 250 rows?

    #89076

    Hello,

    Our theme is optimized and styles.css does not generate the load. Child Custom CSS would not work till child theme has been activated.

    Best Regards

    #89189

    Giulio
    Participant

    Dear Elise, it is clear that using the a style.css with the child theme, the Custom CSS would be not loaded. But I did not understand which method is more faster. Child theme with style.css customized or Custom CSS from theme options? I’m asking this because I have the feeling that our HTML is heavy by the Custom CSS on every pages.

    #89209

    Artem Temos
    Keymaster

    Hi Giulio,

    Yes, it would be much better to keep all the CSS code in the child theme instead of the Custom CSS section in Theme Settings.

    Regards

    #89227

    Giulio
    Participant

    Thanks a lot. It is exactly what I wanted to know. In the past I had already ask something like this, but someone from the support linked me to the CSS Media Queries. I tried to understand what I would need to specify for respect the sections (Global Custom CSS, Custom CSS for desktop, Custom CSS for tablet, Custom CSS for mobile landscape and Custom CSS for mobile), but I’m not a developer and I did not understand well that dimensions to specify. Could you tell me which are for each section of the Custom CSS? For example:

    @media (max-width: 768px){
    }
    #89237

    Bogdan Donovan
    Keymaster

    Custom CSS for desktop:

    @media (min-width: 992px) {
    	
    }

    Custom CSS for tablet:

    @media (max-width: 991px) and (min-width: 768px) {
    
    }

    Custom CSS for mobile landscape:

    @media (max-width: 767px) and (min-width: 481px) {
    
    }

    Custom CSS for mobile:

    @media (max-width: 480px) {
    
    }

    Regards

    #89623

    Giulio
    Participant

    It works perfectly, thank you.

    #89667

    Artem Temos
    Keymaster

    You are welcome.

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘HTML too heavy’ is closed to new replies.