Reputation: 33
I need to investigate the css and js files of some websites. When I open them in Chrome developer tools they sometimes look fine and are properly formatted but sometimes a file can run along a single line like this:
And when I paste it into my text editor, Sublime, it looks like this:
Is there a way in developer tools or Sublime that I can format the file properly, so it is clearly legible? I'm curious as to why a big file can run across a single line like that. Is it to protect it in some way, done with their CMS, to make it hard for people like to look into it, because there are other times when css and js files are formatted just perfectly.
Upvotes: 1
Views: 456
Reputation: 791
This is called minification and serves two purposes:
In dev tools you can use pretty print:
Upvotes: 2