Home  |  Linux  | Mysql  | PHP  | XML
From:C.DeRykus Date:Fri Feb  5 23:57:26 2010
Subject:Re: How to add a last-modified field to a page header ???? ....
> I have implemented a site using Perl, but I'm not really a Perl
> programmer, and now I want to modify the code so that dynamic pages
> are generated with a last-modified field to so that Google will re-
> crawl the pages.
>
> This is what I'm doing to generate the header now ....
>
> print "Content-type: text/html\n\n";
>
> So I think I need to precede that with
>
>
> good?

Yes, I believe the order is significant since the output is
screwy if you flip the order  of  the key/value pairs below:

my $cgi =CGI->new;
print $cgi->header(-type => "text/html",
                               -last_modified => "Tue, 02 Feb 2010
00:00:00 GMT");


Output:
Last-modified: Tue, 02 Feb 2010 00:00:00 GMT
Content-Type: text/html; charset=ISO-8859-1

Note:  -type a CGI shortcut for Content-type.
           underscores are replaced with hypens


--
Charles DeRykus

Navigate in group perl.beginners at sever nntp.perl.org
Previous Next


Your recent visits
Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server
redhatlinux.ahmedyo@gmail.com
problem with PEAR , windows platform , php 5.2.9-2 , IIS Version 6
PHP --info giving segmentation fault


  
© No Copyright
You are free to use Anything
Site Maintained by Zareef Ahmed
Powered By PHP Consultants