ssi, php or something else?
Started by
TaNkZ101
, May 14 2006 07:24 AM
#1
Posted 14 May 2006 - 07:24 AM
#2
Posted 14 May 2006 - 05:40 PM
I would use php, you can do move with it later if you wan't to. I tend to keep the doctype in the web pages (I set the charset with the htaccess). What I put in the includes is stuff like the header and menu, that I change regulay and want the change to be site wide. And since you should have the <title> tag up the top, before the header and after the doctype it gets messy haveing the doctype in the php inclued.
Another great thing about php is you can get your pages sent out compressed for my home page that is from 4837 bites to 1884 bites (I also compress js and css as well).
Another great thing about php is you can get your pages sent out compressed for my home page that is from 4837 bites to 1884 bites (I also compress js and css as well).
#3
Posted 15 May 2006 - 09:51 AM
really? with what code can i sned out compressed so that it automatically decompresses? what do i put in the htaccess to set the charset? will the charset then appear in the source of the page(s)? asking because it's important to me that i pass xhtml 1.0 strict and css validation. yeah i also want to include the header and left side (menu).
#4
Posted 15 May 2006 - 06:04 PM
Very simple actuly, on you main folder put a .htaccess with. I think the validator puts out an error about no charset found which is unfair.
Then you have to put the css files in a folder of there own along with another .htaccess with
Now I better tell you how it all works, when a browser whats a page it sends a messages out like this "Hi am a Mozilla browser, I wan't index.html and I support compessed files and..." ect, and then the server sends out index.html compress and the browser decompress it. This works for IE and Netscape 4 and everything eles since. If the browser dose not say it suports compress files, it gets the non compressed stuff.
Change foo.php it what ever the real file you including is. What gose in the foo.php is exactly the same as what you would normaly put in html file for the menu. The server then stitches the files togeather and sends then out.
Since you are useing xhtml I am going to ask to you read
php_flag zlib.output_compression On AddType 'application/x-httpd-php; charset=ISO-8859-1' css js php xhtml html
Then you have to put the css files in a folder of there own along with another .htaccess with
php_value default_mimetype "text/css"and in the folder with the js (and only js files)
php_value default_mimetype "text/javascript"
Now I better tell you how it all works, when a browser whats a page it sends a messages out like this "Hi am a Mozilla browser, I wan't index.html and I support compessed files and..." ect, and then the server sends out index.html compress and the browser decompress it. This works for IE and Netscape 4 and everything eles since. If the browser dose not say it suports compress files, it gets the non compressed stuff.
Change foo.php it what ever the real file you including is. What gose in the foo.php is exactly the same as what you would normaly put in html file for the menu. The server then stitches the files togeather and sends then out.
<?php include("foo.php"); ?>
Since you are useing xhtml I am going to ask to you read
Don't use XHTML unless you understand it: http://hixie.ch/advocacy/xhtml
Edited by Michael, 15 May 2006 - 08:01 PM.
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users