X
    Categories: GoogleSEO

Webmasters Should Use Caution When Dynamically Serving Javascript, CSS & Images

Google is warning webmasters about the dangers of dynamically serving on page resources such as JavaScript, CSS and images.

Google has been trying to steer webmasters away from dynamically serving webpages as it makes it harder to index content, there can be duplicate content issues, and there’s always a potential spam issue. And it is becoming somewhat outdated for many usages that webmasters were previously using it for, although it is still used for things such as serving location specific content based on a visitor’s IP address.

Pierre Far of Google suggests that webmasters use the following when dealing with JavaScript, CSS and images.

1. For JavaScript, you can use simple code (an if statement) embedded in the HTML to fetch different JS files.

2. For CSS, you can use different media queries to download the right CSS file.

3. For images, you can use the <picture> element or srcset attributes as described here: http://responsiveimages.org . Granted browser support is not 100% yet, but it’s quickly coming along, so prepare to benefit from this soon!

It also raises the question about whether Google is bringing this up because it has plans to algorithmically downrank (at least to a small degree) sites using dynamically served content in the future as a way to curb spam and other search issues that go along with dynamically served content.   We know Google already negatively impacts websites when webmasters block elements such as CSS and javascript from being crawled by Googlebot, so it could be something they are considering in the future on sites using dynamic elements.

The following two tabs change content below.

Jennifer Slegg

Founder & Editor at The SEM Post
Jennifer Slegg is a longtime speaker and expert in search engine marketing, working in the industry for almost 20 years. When she isn't sitting at her desk writing and working, she can be found grabbing a latte at her local Starbucks or planning her next trip to Disneyland. She regularly speaks at Pubcon, SMX, State of Search, Brighton SEO and more, and has been presenting at conferences for over a decade.
Jennifer Slegg :Jennifer Slegg is a longtime speaker and expert in search engine marketing, working in the industry for almost 20 years. When she isn't sitting at her desk writing and working, she can be found grabbing a latte at her local Starbucks or planning her next trip to Disneyland. She regularly speaks at Pubcon, SMX, State of Search, Brighton SEO and more, and has been presenting at conferences for over a decade.