0

I have added a minifed css to my website for better speed and performance. However, When i look into the browsers developer tools, the css sources for any elements are coming from nomal theme.css file, instead of theme.min.css.

I dont know wheather my minified css files is being used or not? Anyone please guide.

Also, I have theme.min.css.map file. When its being used?

2
  • You can check view page source =>ctrl + U Commented Nov 8, 2017 at 7:17
  • Yes, I checked the page source, but it's showing minified file added Commented Nov 8, 2017 at 7:40

4 Answers 4

1

If you see the minified CSS file path in your tags, it's being used. If Chrome developer tools show the original file in italic, it's being referenced by the map. Like this:

enter image description here

Image taken from: Why does Chrome devtools show these folders in orange and in italics?

Sign up to request clarification or add additional context in comments.

2 Comments

Okay. So in my case, child-theme.css file is in italics. So this file is being referenced by map file to the minified version. Developer tools is showing the mapped normal css file. Am i correct?
Yes. thats the case.
0
  1. Double confirm you have given the right file name ,you might have not or
  2. It might be that the content are loaded from cache clear your cache or try with hard refresh pressing Ctrl+f5 if you are in Mozilla firefox browser.

2 Comments

I checked the file names, also done with the hard refresh. But no change, I can see in the page source, (after CTRL + U), the minified file is added.
Are you adding both css. if you are adding both the files. Try this add theme.min.css AFTTER theme.css
0

You can verify whether the browser is loading the minified version or not by going to chrome devtool->network->after a hard reload click on the file you want to inspect->see the response....to view the minified version in sources just click on curly bracesenter image description here

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
-1

Did you give the correct file name? it should be theme.min.css instead of theme.css

1 Comment

I checked the file names, also done with the hard refresh. But no change, I can see in the page source, (after CTRL + U), the minified file is added.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.