Is there a problem in the existence of duplicate CSS, but 100% the same?

1

I have an application, where I have a file called "layout" which is responsible for displaying all HTML (head, footer, body just to call the side menu which is another file) CSS and Javascript common to all pages of this application.

All the pages of my application, I create only the body of them, because I call the layout to display the rest. Everything works fine up there.

There was a time when I needed to create a custom%% for a specific page, so in the body of that page it includes this CSS with the CSS tag. But this time, had to occur other times with this same CSS, leaving it to be rare in the application.

Then I put this <style> in the application's default%% file, but since I have hundreds of pages, that CSS also exists in the body of that page, causing it to exist in duplicate when these pages are accessed.

I'm slowly removing this CSS from these pages and leaving it only in the file of CSS default.

Can this duplicate% of% result in some performance problem or other problem?

    
asked by anonymous 24.03.2017 / 21:13

1 answer

1

Problems in page layout only if there are different rules, and in this case, if any element is hit by both rules and have the same force, the one that is declared last is the one that will be worth.

When a person first enters the site, the first few seconds are critical to grab the attention and convince them to stay for a while or to come back in the future. If your site takes a long time to load, most people give up and quit even before they have had a chance to show you the value of their service. "A one-second delay can result in 7% fewer conversions, 11% less pageviews, or even a 16% decrease in customer satisfaction" BRYAN EISENBERG .

Clean code means faster loading and happy visitors.

It's important to keep loading time down by writing semantically-appropriate code, using best practices for performance optimization and routinely cleaning CSS, HTML, and images.

Generally, the loading time of the site will increase with its evolution and this, in a way, is something already expected. That's why it's important to make this HTML, CSS and image cleanup routine a natural part of the workflow to ensure a positive user experience.

You can test the performance of your site at Webpagetest

    
25.03.2017 / 02:05