Submit Your Article Forum Rules

Results 1 to 5 of 5

Thread: Dynamic code in source code

  1. #1
    Senior Member Milo's Avatar
    Join Date
    Nov 2004
    Posts
    238

    Dynamic code in source code

    Hey all,
    while doing my daily check on ranking etc I came across something I have not seen before. The top 2 ranking sites in my industry and location seem to have dynamic code appearing just above the <html> coding. This is what is looks like:

    <!--Ref : http://www.google.com.au/search?hl=en&q=wedding+stationery&meta=-->

    It changes with the search query. For example, the above was obtained with the search query "wedding stationery". When I search for "wedding invitations", I get

    <!--http://www.google.com.au/search?hl=en&q=wedding+invitations&meta=-->

    That was from the #2 site. The #1 ranking site has even more info in that line:

    <!--http://www.google.com.au/search?hl=en&q=wedding+invitations&meta=___clicked _on:Thursday,_June_28,_2007_9:33:41_PM-->

    Does anyone know how this is generated and would its addition help ranking?
    Thanks in advance.

  2. #2
    Member
    Join Date
    Oct 2005
    Posts
    40

    Re: Dynamic code in source code

    Creating the code is fairly easy using PHP or another scripting language. It just needs to check if the referrer is Google, and if so, print the referrer information on the fly.

    As to why, it's hard to tell as it wouldn't get picked up by Google bots due to only being generated when someone has actually used search terms.

    Cheers,
    Niggles
    -------------------------------------------------
    World Music World - bringing the World's Folk Music Cultures Together
    http://www.worldmusicworld.com/
    -------------------------------------------------

  3. #3

    Re: Dynamic code in source code

    Broken code is never good for the SE's. I've seen this before. I often look for code errors and find sites that have found themselves ranked for that error because the site is broken. In the short term I'm not sure it is all tha bad however if they error is not fixed It might result in a PR loss.

  4. #4
    Member
    Join Date
    Oct 2005
    Posts
    40

    Re: Dynamic code in source code

    It's not really an error though - it's just a comment tag with the referrer information. I can't see how it would help SEO efforts (or harm them) as the tag only exists when a human views it - unless it prints all referrer strings.

    Maybe they were logging it to a database and were echo-ing it as a test and forgot to turn it off when done?

    Actually, having now Googled the site in question, by directly echo-ing the query from Google opened it right up to XSS injection! It was pretty easy to break the page by closing off the comment tag in the Google query.

    Cheers,
    Niggles
    -------------------------------------------------
    World Music World - bringing the World's Folk Music Cultures Together
    http://www.worldmusicworld.com/
    -------------------------------------------------

  5. #5
    Senior Member Milo's Avatar
    Join Date
    Nov 2004
    Posts
    238

    Re: Dynamic code in source code

    Thanks guys,
    by the sounds of it, its not something that would do anything to improve rankings, right?

Similar Threads

  1. source code of calender in javascript
    By sushil in forum Web Programming Discussion Forum
    Replies: 0
    Last Post: 01-27-2009, 01:11 AM
  2. Description Twice on the Source Code!
    By tushar123 in forum Search Engine Optimization Forum
    Replies: 4
    Last Post: 08-23-2007, 06:52 AM
  3. Protect Source Code
    By MySipsTea in forum Graphics & Design Discussion Forum
    Replies: 3
    Last Post: 10-04-2004, 08:37 AM
  4. Source code not available =;-(
    By groenie in forum Web Programming Discussion Forum
    Replies: 4
    Last Post: 08-17-2004, 11:29 AM
  5. Help!!! Can't view source code
    By mscrow in forum Graphics & Design Discussion Forum
    Replies: 11
    Last Post: 01-10-2004, 04:17 AM

Posting Permissions

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