Results 1 to 10 of 10

Thread: Do What G Does

Hybrid View

  1. #1

    Do What G Does

    Let's share simple HTML code templates to replicate what big G does.

    e.g.

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Gmail</title>
    <meta name="description" content="The description about what is to follow">
    </head>
    <body >
    For the header of a web page.

  2. #2
    HTML5
    does it have to be based on Goolge tho?

    P.S what do you think the source code of my homepage? www.aziznatour.com
    Last edited by Aziz; 31 October, 2010 at 15:02 PM. Reason: I CAN'T TYPE MY OWN NAME PROPERLY

  3. #3
    Quote Originally Posted by Aziz View Post
    HTML5
    does it have to be based on Goolge tho?

    P.S what do you think the source code of my homepage? www.aziznaotur.com
    Corrected version: www.aziznatour.com
    |Nico Lawsons

  4. #4
    P.S what do you think the source code of my homepage? www.aziznatour.com
    Aziz, your code looks neatly laid out. But I would move the Javascript from the header to the end of the web page code since it should be loaded last.

    I'm interested in looking at how Google does things since they don't always obey the "rules" of coding and are heavily into web page speed, especially with delivering search results.

    The search page has almost no HTML:

    Code:
    <!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title><script>Some code</script>
    Extreme on-page SEO maybe?

  5. #5
    Quote Originally Posted by Andy101 View Post
    Aziz, your code looks neatly laid out. But I would move the Javascript from the header to the end of the web page code since it should be loaded last.

    I'm interested in looking at how Google does things since they don't always obey the "rules" of coding and are heavily into web page speed, especially with delivering search results.

    The search page has almost no HTML:

    Code:
    <!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title><script>Some code</script>
    Extreme on-page SEO maybe?
    it is funny, Google suggests to place javascript "before the closing of the <head> tag"

  6. #6
    it is funny, Google suggests to place javascript "before the closing of the <head> tag"
    They would do so that their tracking script gets priority, but a website visitor wants to view the page content before any javascripts run.

  7. #7
    Andy is correct. When possible, all Javascript definitions should appear at the END of your page just before the </body> element. It's probably less important now than in the past when Google used to only index the first 100K or so of a page... but its still good practice.

    What's even a better practice is to define all Javascript functions (where possible) in EXTERNAL JS files to increase the content:code ratio of the page... and because it's just good coding practices.

    Why define the same function over and over in every page of your site when you can put it in an external file and reference that file using <link> from all of your pages? If you need to change a function that is hardcoded in every page of the site, you'll have to edit every page on the site... versus editting ONE copy of the function in an external JS file and have the new definition picked up automatically by all pages on the site through the <link> element for that script file.

  8. #8
    Quote Originally Posted by Abhishek01 View Post
    that's mean google always trying to keep their pages clean and clear to understand
    Have you ever looked at the code for Google's home page? It is loaded with errors and uses old, outdated coding standards and violates several rules for the code structure of a page.
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


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
  •