Correct Site Header

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Correct Site Header

    Guys what is the correct site header using UTF-8 encoding so that when i click the back key of my browser previous pages i entered will automatically loaded without waiting several seconds to load it again,.I saw certain sites that when i click back previous pages automatically reloaded without any page revalidation.I think it was because of cache save by the browser..
    Anyway heres my site header..

    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";

    It implies no-cache and must revalidated, maybe thats why when i browse my site at click back to the previous page the page will revalidate again and i must have to wait few seconds before its done,took a little hastle thats why i want to change it. My site is a session base.Please anyone helps me to fix this out,thanks a lot in advance...
    Heres my site http://pinoygsm.net

    #2
    LoL!

    Its very simple!!!
    -your site is almost finish!
    but simple Wap Mobile header you do not how to set!
    What the hell!?...


    Heres a c0de...

    Code:
     <?php
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
    ?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="application/vnd.wap.xhtml+xml; charset=utf-8" />
    <title>www.WapShared.com :: Unlimited Free Downloads
    </title>
    </head>
    <body>
    ü lol!Hehe
    Last edited by cpg12; 07.05.10, 12:09.

    Comment


      #3
      l0l, do u really think that i dont know how to create a correct header for my site? just think about this one, do my site work well in any mobile browsers if my headers are incorrect? dont act so stupid man, try to understand and analize what im trying to imply regarding this topic. Its regarding cache headers and not the really type of header, lol.!

      Comment


        #4
        i use this for WML
        PHP Code:
        <?php
        header
        ("Content-type: text/vnd.wap.wml; charset=utf-8");
        header("Pragma: no-cache");
        header("Cache-Control: no-store; no-cache; must-revalidate");
        echo(
        "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
        echo 
        "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
        ?>
        and this for XHTML
        PHP Code:
        <?
        header("Content-type: text/html; charset=utf-8");
        echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
        echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
        echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">";
                echo "<head>";
                    echo "<link rel=\"Shortcut Icon\" href=\"img/favicon.ico\" type=\"image/x-icon\"/>";
                        echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
                            echo "<title>whatever</title>";
                        echo "<meta name=\"description\" content=\" whatever\"/>";
                        echo "<meta name=\"keywords\" content=\"bla, bla\"/>";
                    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\"/>";
                echo "</head>
        ?>
        and haven't had any problems so far
        It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
        ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
        ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
        キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

        Comment


          #5
          i use this for my UnDiL.com and its works fine with me....

          Code:
          <?php
          header("Cache-Control: no-cache, must-revalidate");
          header('Content-type: text/html; charset=ISO-8859-1');
          echo '<?xml version="1.0"?>
          <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
          <head>
          <title>:: UnDiL.COM :: - Music,videos,wallpapers,games,chat,search,coding-forum,live cricket score... and much more..</title>
          <meta http-equiv="Pragma" content="no-cache" />
          <meta http-equiv="no-cache" content="no-cache" />
          <meta http-equiv="Cache-Control" content="no-cache" />
          <link rel="stylesheet" type="text/css" href="/css.css"/>
          <meta name="description" content="undil.com meta description is goes here " />
          <meta name="keywords" content="undil.com meta keywords is goes here " />
          </head>';
          ?>
          Last edited by DiL; 09.05.10, 10:03.
          Sandeep DiL (INDIAN)



          Comment


            #6
            Or:

            PHP Code:
            echo '<?xml version="1.0" encoding="utf-8"?>';
            echo '
            <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd">
            <html>
            <head>
            <meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml"/>
            <meta http-equiv="Cache-Control" content="max-age=0"/>
            <title>...</title>
            <link rel="stylesheet" type="text/css" href="wapforum.css"/>
            <link rel="shortcut icon" href="favicon.ico"/>
            <meta name="keywords" content="..."/>
            </head>
            <body>';
            <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

            Comment


              #7
              you can try this
              Code:
              [PHP]
              header('Content-type: text/html; charset=utf-8');
              [/PHP]

              Comment

              Working...
              X