Re: Non-caching META-tags
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 +, 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]
Re: Non-caching META-tags
On Wed, 20 Nov 2002 at 13:58, Michael Kelly opined: MK:On Wed, Nov 20, 2002 at 02:02:05PM +, Nick Malden wrote: MK: MK:CGI.pm doesn't support http-equiv meta-tags, according to the documentation. MK:What about something as simple as: what? snippet from perldoc CGI: To create an HTTP-EQUIV type of meta tag, use -head, described below. And here's how to create an HTTP-EQUIV meta tag: print start_html(-head=meta({-http_equiv = 'Content-Type', -content= 'text/html'})) the error associated with the original post's code was due to the fact that the syntax was not correct. the solution that CGI.pm provides means that, even if the syntax is corrected, it still won't work. use the -head method described in the CGI docs. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Non-caching META-tags
Perl/CGI really doesn't seem to like this way of doing META tags. I've trimmed the irrelevant stuff, am the core of what I'm trying is the following: #!/usr/local/bin/perl use POSIX; use CGI; $q = new CGI; print $q-header, $q-start_html(-title='New page', -head=meta({-http_equiv = 'Content-Type', -content = 'text/html'})); print EOT; This is the generated HTML. /body /html EOT In my browser (netscape) I get a 500 Internal Server error, or run from a shell I get: Undefined subroutine main::meta called at test.pl line 7. Any ideas? Thanks. Nick On Thu, 21 Nov 2002, fliptop wrote: On Wed, 20 Nov 2002 at 13:58, Michael Kelly opined: MK:On Wed, Nov 20, 2002 at 02:02:05PM +, Nick Malden wrote: MK: MK:CGI.pm doesn't support http-equiv meta-tags, according to the documentation. MK:What about something as simple as: what? snippet from perldoc CGI: To create an HTTP-EQUIV type of meta tag, use -head, described below. ... And here's how to create an HTTP-EQUIV meta tag: print start_html(-head=meta({-http_equiv = 'Content-Type', -content= 'text/html'})) the error associated with the original post's code was due to the fact that the syntax was not correct. the solution that CGI.pm provides means that, even if the syntax is corrected, it still won't work. use the -head method described in the CGI docs. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Non-caching META-tags
sub mainHeader{ print $q-header( -type = text/html, -expires = now ), $q-start_html( -title = Your Title); This has always worked for me. I don't know if will do everything for you. -Original Message- From: Nick Malden[EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Wed Nov 20 06:02:05 PST 2002 Subject: Non-caching META-tags 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 I want to do the same thing in a page generated by perl/cgi, i.e something like: print $q-header, $q-start_html(-title='My new page', -meta={'http-equiv'='Cache-Control' 'content'='no-cache,must-revalidate'}) -meta={'http-equiv'='Pragma: no-cache'}); but this gives String found where operator expected at test.pl line 20, near 'Cache-Control' 'content' How does one get perl produce the equivalent of the META tags above? Nick _ Nick Malden, Manchester Gruppe, DESY, Notkestrasse 85, 22607 Hamburg. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ GO.com Mail Get Your Free, Private E-mail at http://mail.go.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Non-caching META-tags
Hi, Try using use CGI qw/:standard/; Works for me Cheers Koen -Original Message- From: Nick Malden [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 2:39 PM To: fliptop Cc: Michael Kelly; Perl Beginners CGI List Subject: Re: Non-caching META-tags Perl/CGI really doesn't seem to like this way of doing META tags. I've trimmed the irrelevant stuff, am the core of what I'm trying is the following: #!/usr/local/bin/perl use POSIX; use CGI; $q = new CGI; print $q-header, $q-start_html(-title='New page', -head=meta({-http_equiv = 'Content-Type', -content = 'text/html'})); print EOT; This is the generated HTML. /body /html EOT In my browser (netscape) I get a 500 Internal Server error, or run from a shell I get: Undefined subroutine main::meta called at test.pl line 7. Any ideas? Thanks. Nick On Thu, 21 Nov 2002, fliptop wrote: On Wed, 20 Nov 2002 at 13:58, Michael Kelly opined: MK:On Wed, Nov 20, 2002 at 02:02:05PM +, Nick Malden wrote: MK: MK:CGI.pm doesn't support http-equiv meta-tags, according to the documentation. MK:What about something as simple as: what? snippet from perldoc CGI: To create an HTTP-EQUIV type of meta tag, use -head, described below. ... And here's how to create an HTTP-EQUIV meta tag: print start_html(-head=meta({-http_equiv = 'Content-Type', -content= 'text/html'})) the error associated with the original post's code was due to the fact that the syntax was not correct. the solution that CGI.pm provides means that, even if the syntax is corrected, it still won't work. use the -head method described in the CGI docs. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Non-caching META-tags
On Thu, 21 Nov 2002 at 08:09, Michael Kelly opined: MK:On Thu, Nov 21, 2002 at 07:19:37AM -0500, fliptop wrote: MK: On Wed, 20 Nov 2002 at 13:58, Michael Kelly opined: MK: MK: MK:On Wed, Nov 20, 2002 at 02:02:05PM +, Nick Malden wrote: MK: MK: MK: MK:CGI.pm doesn't support http-equiv meta-tags, according to the documentation. MK: MK:What about something as simple as: MK: MK: what? snippet from perldoc CGI: MK: MK: To create an HTTP-EQUIV type of meta tag, use -head, described below. MK: MK:Hrm, I must have an old version (2.56). From perldoc CGI, line 1013: MK: MK: There is no support for the HTTP-EQUIV type of META tag. MK: MK:Looks like I need to update. Sorry for the misinformation! yeah - the latest version is 2.89, released october 16th. http://search.cpan.org/author/LDS/CGI.pm-2.89/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Non-caching META-tags
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 I want to do the same thing in a page generated by perl/cgi, i.e something like: print $q-header, $q-start_html(-title='My new page', -meta={'http-equiv'='Cache-Control' 'content'='no-cache,must-revalidate'}) -meta={'http-equiv'='Pragma: no-cache'}); but this gives String found where operator expected at test.pl line 20, near 'Cache-Control' 'content' How does one get perl produce the equivalent of the META tags above? Nick _ Nick Malden, Manchester Gruppe, DESY, Notkestrasse 85, 22607 Hamburg. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Non-caching META-tags
On Wed, 20 Nov 2002 at 14:02, Nick Malden opined: NM:print $q-header, NM: $q-start_html(-title='My new page', NM:-meta={'http-equiv'='Cache-Control' 'content'='no-cache,must-revalidate'}) NM:-meta={'http-equiv'='Pragma: no-cache'}); NM: NM:but this gives NM: NM:String found where operator expected at test.pl line 20, near NM:'Cache-Control' 'content' are you missing a comma and a greater than sign there? -meta={'http-equiv'='Cache-Control', ^ 'content'='no-cache,...' } ^ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Non-caching META-tags
On Wed, Nov 20, 2002 at 02:02:05PM +, 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. Hope that helps somewhat, -- Michael -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]