For a long time webmasters would block Javascript and CSS. By doing so, it would make the site faster for Google to crawl. Also, Google couldn’t execute this stuff, so most SEOs thought, “What is the point?”
Now Google has come out and said, allow us to crawl your Javascript and CSS. In fact, they are saying you need to do this for better rankings!
QUOTE FROM GOOGLE: “Disallowing crawling of Javascript or CSS files in your site’s robots.txt directly harms how well our algorithms render and index your content and can result in suboptimal rankings.”
Panda 4.0 SEO and Javascript and CSS
A recent post was written on the Yoast blog that points to blocking Javascript and CSS as it directly negatively impacting a website after the Panda 4.0 update. Basically, Joost de Valk did fetch as Googlebot and saw that page was incredibly bare. Once the CSS and Javascrip block was removed in the robots.txt file the rankings for the website were restored to more normal levels.
Does it Make Sense to Block CSS and Javascript Always?
This is a tough question to answer. In most cases you want to do what Google says. However, I do know of a few websites that integrate third party technology in the form of CSS and Javascript. They then block this from Google, allowing their main website to rank and their third party technolog y to be ignored. In this case, it does seem to still make sense to keep that stuff blocked, especially if the search engine optimization conflicts with other optimization on the website.
Should you Allow Google to Crawl your Javascript and CSS?
The new verdict here is a strong “yes.” Only in rare situations will you need to block a directory that delivers this information. If you have a responsive site or just a website with some cool CSS or Javascript bells and whistles, Google wants to see that. They can now execute these items and render a page. So allow them to do it.
Sources
- Google Webmaster Guidelines Updated To Warn About Blocking CSS & JavaScript Files. SEL. Barry Schwartz on October 27
- Google Panda 4, and blocking your CSS & JS. Yoast.com. Joost de Valk. 19 June, 2014