SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru risoknop's Avatar
    Join Date
    Feb 2008
    Location
    end($world)
    Posts
    834
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adsense doesn't show up on XHTML 1.0 Strict website

    Hello,

    Adsense ads are not working on a site with XHTML 1.0 Strict doctype which is served as text/html. Any ideas what could be the problem?

    One more thing, the ads show up on my localhost properly.

  2. #2
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So when you push the document live or to a higher staging adsense doesn't show up, but on your local it does when using a strict doctype?

    If this is the case then it must be a path issue and not the doctype.

  3. #3
    SitePoint Guru risoknop's Avatar
    Join Date
    Feb 2008
    Location
    end($world)
    Posts
    834
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So when you push the document live or to a higher staging adsense doesn't show up, but on your local it does when using a strict doctype?
    Exactly.

    If this is the case then it must be a path issue and not the doctype.
    What path do you mean? I just put javascript code there like this for example:

    Code:
    <script type="text/javascript">
    <!--
    google_ad_client = "pub-4696246997472310";
    /* 250x250, created 4/15/09 */
    google_ad_slot = "2456313591";
    google_ad_width = 250;
    google_ad_height = 250;
    //-->
    </script>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
    I also tried CDATA instead of comments but that didn't help.

  4. #4
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So you've already tried these?
    http://javascript.about.com/library/blxhtml.htm

    Also have you tried to put this before the other js?
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

  5. #5
    SitePoint Guru risoknop's Avatar
    Join Date
    Feb 2008
    Location
    end($world)
    Posts
    834
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    So you've already tried these?
    http://javascript.about.com/library/blxhtml.htm

    Also have you tried to put this before the other js?
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
    Didn't help.

    There is also one other option - that the site has been banned from Adsense?

    That would be much simpler explanation lol. That would explain why it shows up on the locahost but not online.

  6. #6
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, it does work locally... Very odd issue.

    I am curious myself why this isn't working

    Anyone have any insight on this issue?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •