Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Concerned Of Use Of "ethical" Use Of Ajax/javascript On A Si


  • Please log in to reply
7 replies to this topic

#1 Teesweb

Teesweb

    HR 1

  • Members
  • Pip
  • 4 posts

Posted 07 July 2009 - 03:26 PM

Hi,

Great forum and great information here, have lurked quite a while and picked up lots of great advice.

I know I am new here and I hate my first post being of this nature but I am in a position that the client is now converned that the work I have done could be detremental to the performance and rankings of the site. So i was hoping if Jill or someone suitably qualified can confirm if I am correct in what I have done or if infact I have made a mistake.

I have been doing web development work and some onsite SEO for a client with a site in a very competititve industry and was recently asked to put some sort of notification for site visitors to read about the delivery of their items.

The basic idea was a "one time" message that would tell every new visitor this one piece of important information and then once they click the area it would dissapear forever.

Basics:

The information box is a Div with a class:

CODE
<div class="important_info3"><div class="dis-content"><h6>Important Information!</h6><p>Please be assured that "COMPANY NAME" does not <strong id="red-b">NOT</strong> partake in an autoship program.<br />Some unethical slimming sites are re-charging customers cards each month and re-sending products on something called autoship. We are a professional, integrous company and value our customers and our excellent reputation. Thank you.</p><h6><strong>(Please click to close)</strong></h6></div></div>


the class="important_info3" is attached to a snippet of javascript that basically works that when a visitor clicks anywere on that div the div and content dissapear.

It sets a cookie to know that the user has seen the content and then will not show that information to them again once closed (unless they delete their cookies)

Clients Concern:

The client is concerned that because the content is not accessible to people without JavaScript enabled then this could looked upon by google as giving different content to the search bot as to the visitor and penalise the site for it

My Thoughts:

Because the content is not spammy or using any keywords that the target page is competing for that this would not be the case.

Additionaly I do not see the search engines bot being able to work out from the DIV that the content is not visible on the page because the javascript is using custom variables for its control of the disapearing DIV.

I have seen many sites use these Ajax/Javascript message boxes in the exact same way.

I personally know there is nothing unethical that is being performed it is simply providing a notice to reasure customers of how the site operates, if someone does not have javascript they do not see a broken site or reference for any missing code etc.

Whats your thoughts on this, do you see a problem or is this just panic over nothing?

Many thanks

Rob

#2 Jill

Jill

    Recovering SEO

  • Admin
  • 33,009 posts

Posted 07 July 2009 - 03:31 PM

QUOTE
Because the content is not spammy or using any keywords that the target page is competing for that this would not be the case.


Why not just also place the content in a <noscript> tag? That's exactly what it's for.

#3 Teesweb

Teesweb

    HR 1

  • Members
  • Pip
  • 4 posts

Posted 07 July 2009 - 03:59 PM

QUOTE(Jill @ Jul 7 2009, 09:31 PM) View Post
Why not just also place the content in a <noscript> tag? That's exactly what it's for.


biggrin.gif sometimes you can just look to far into the forest you can't see the trees

Many thanks for the swift response Jill much appreciated.

#4 qwerty

qwerty

    HR 10

  • Moderator
  • 8,628 posts
  • Location:Somerville, MA

Posted 07 July 2009 - 05:46 PM

Keep in mind that if you nest it in a <noscript> tag it's going to show to anyone without JS enabled, every time they open the page. But we're talking about very few people, and I don't think it's going to cause a problem. While I can see why you'd only need to show the text to a user once, there's really no harm in someone seeing it each time they open the page.

#5 Teesweb

Teesweb

    HR 1

  • Members
  • Pip
  • 4 posts

Posted 08 July 2009 - 02:44 AM

QUOTE(qwerty @ Jul 7 2009, 11:46 PM) View Post
Keep in mind that if you nest it in a <noscript> tag it's going to show to anyone without JS enabled, every time they open the page. But we're talking about very few people, and I don't think it's going to cause a problem. While I can see why you'd only need to show the text to a user once, there's really no harm in someone seeing it each time they open the page.

It works really well without the javascript because i was also using the Javascript to display the div at the very top of the page so it was the first thing the visitor saw, but the div was the last thing on the page in the html (as i didnt want to push the h1 and content down in the html) so when javascript is not available the message is displayed at the bottom of the page smile.gif

Thanks for the help with this especially the fact I forgot about using noscript to be honest for a few years now I just take it that everyone has JavaScript enabled which I know is wrong.

#6 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 08 July 2009 - 03:38 AM

<noscript> is certainly the easiest. And perfectly legitimate.

If you didn't want to go that route for one reason or another a slightly different way to do would simply be to include a little text link on the page somewhere that allows all js-enabled users to toggle the div to be visible with an onClick event. This also removes any possibility of the engines seeing it as being hidden content, since you're giving them and other users a way to make it viewable. Especially if you made it 100% accessible by opening the statement in a new window for those few non-js compliant browsers out there.

#7 1dmf

1dmf

    Keep Asking, Keep Questioning, Keep Learning

  • Active Members
  • PipPipPipPipPipPipPip
  • 2,167 posts
  • Location:Worthing - England

Posted 08 July 2009 - 04:02 AM

Yup, You also have to remember what G! might think about the use of Javascript is one thing.

But more importantly you need to think about accessibility and the seriousness of how being sued for a non accessible site is going to cost you!

If you want to hide content for those with JS and display it for those without, why not do the opposite, don't use JS to show it, use JS to hide it!

remember you might not have a JS capable browser or it switched off but CSS will run just fine, if you have CSS making something 'display:none;' , and no JS , then you can never make it visible! unless you use a pseudo class and that doesn't work for all elements in all browsers!



#8 Teesweb

Teesweb

    HR 1

  • Members
  • Pip
  • 4 posts

Posted 08 July 2009 - 04:25 AM

Its working great now to be honest, all users with javascript get a nice "important info" box at the top of the site and once click is dissapears and non javascript browsers have the notice at the footer of the site, so it is visible to all and not a problem for accessibility.

Thanks for everyones input




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!