Thanks for the suggestions.

The problem is that for these META-tags to work, they have to be in the
header, not the body of the HTML. Thus if I use 

#*** Start HTML stuff *** 
print $q->header,
      $q->start_html(-title=>'New page',
                     -style=>{'src'=>'mystyle.css'});

and then do the suggested:

print <<_META_TAGS_; 

the META tags appear in the body of the text and are then ineffective.

Seeing as CGI.pm doesn't support http-equiv meta-tags, as you found out,
perhaps the answer is not to be generating the header using CGI.pm at all,
but simply using "standard" print statements.

Nick

On Wed, 20 Nov 2002, Michael Kelly wrote:

> On Wed, Nov 20, 2002 at 02:02:05PM +0000, Nick Malden wrote:
> 
> Hi Nick,
> 
> > When writing HTML, the trick I normally use to ensure that images etc are
> > definitely the latest version, and not the cached version, is the
> > following:
> > 
> > <META http-equiv="Cache-Control" content="no-cache, must-revalidate">
> > <META http-equiv="Pragma: no-cache">
> [snip]
> > How does one get perl produce the equivalent of the META tags above?
> 
> CGI.pm doesn't support http-equiv meta-tags, according to the documentation.
> What about something as simple as:
> 
> print <<_META_TAGS_;
> <META http-equiv="Cache-Control" content="no-cache, must-revalidate">
> <META http-equiv="Pragma: no-cache">
> _META_TAGS_
> 
> IMNSHO, CGI.pm shines when you're getting form input, printing forms or tables
> dynamically, or messing with cookies. With something as straight-forward as
> printing out meta-tags and headers, though, I personally feel it's drastic
> overkill.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to