I’m confused between the two. Which is better, especially for jQuery and JS? Also, which do you think is more SEO-friendly? Note: I’m a noob.

link|improve this question
I don't think that it matters. – ckruse Dec 16 '11 at 8:26
minified code because obfuscated code is smaller but you should do more operations every time and the code will be cached when it is loaded the first time so the first loading time is not so important – micha Dec 16 '11 at 8:28
+1 for confessing that you are noob. Me too but I never admited it but I'll do now :D – Sean87 Dec 16 '11 at 8:28
@ckruse Very well said. Thanks! – jazzQuery Dec 16 '11 at 8:30
@chown Just edited the title. I'm really asking for opinions about using "minified" or "obfuscated" code. :) – jazzQuery Dec 16 '11 at 8:33
feedback

migrated from stackoverflow.com Dec 16 '11 at 8:36

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 14 down vote accepted

None of them. It will not be indexed (only in obscure odd cases).

Minifying JS is about loading speed and Obfuscating JS is for making it harder for other developers to read your code.

Google does however rank your website based on loadspeed, and if you are including 15 javascript files and 20 stylesheets, your site gets slow and therefore looses rank. Therefore it's a great idea to combine these 15 javascript files into one and minify it, to minimize the loading speed.

This is because most user-agents (e.g. browsers) can only make 2 simultaneous requests on the same domain.

link|improve this answer
Hey Jan, thanks for explaining it in layman's terms! – covanova Dec 16 '11 at 8:39
feedback

If you minify your js, your page loads faster and that matters for SEO.

link|improve this answer
Thanks for your help, @Bogdan Rotund – covanova Dec 16 '11 at 8:41
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.