At Gazebo we love to use unobtrusive enhancement to make our solutions available to the biggest possible audience, and greatly improve the experience for users with sophisticated user-agents.
This usually means:
- Create semantic, valid markup, which can be read by any browser, including phones
- Add styling via CSS, to make it look nice in modern, sophisticated browsers
js-enabled or something similar to the classname of the
Avoiding getting your warnings indexed by search engines
But, and here’s the kicker, I didn’t want every page on the site indexed by Google to have a big fat warning, telling users to go elsewhere.
So, how does one go about providing users with nice friendly warnings, without spamming the search engine indexes with useless warnings, that say absolutely nothing about your site?
So far, the only solution I have been able to come up with is this:
- To prevent indexing, place the content in a separate file, and load that file using an iframe inside the noscript tag, thus:
- Lastly, don’t forget to modify your robots.txt to make sure search engines will know to exclude the warning message from the index
This a repost from the Gazebo blog, as it is no longer maintained, and I didn’t want my posts from that blog to disappear.