Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: tlug: META tags in perl scripts



Thanks for replies.


> print "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=http://file.html\">";

>I'm not sure what you are trying to do here and the URL looks strange.

Yeah, that was a little misrepresentative.
I actually have URL=http://www.x.y.z./file.html

I am doing the following--
The perl script parses the results of an HTML form and opens file.html to
write them there. (actually it creates file.html in HTML format with the
results in the body). Then I want the browser to immediately display
file.html with the updated results.
So I open, write to, and close file.html and have the following lines

print "Content-type: text/html\n\n";
print "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;
URL=http://www.x.y.z./file.html\">";

I could have just used
print "Location: http://www.x.y.z/file.html\n\n";
print "Content-type: text/html\n\n";

But the problem with that is that after re-submitting the form the browser
loads file.html from the cache, displaying the old results I think, so one
must manually reload to see the update.  Actually, the content and META line
approach do the same, there is no difference.

I also tried to add the META line in the header section of file.html
(without "URL" part)  when writing to it, but this produces undesirable
results, the browser kind of spazzes out for a while.

>If you write in perl and don't use CGI.pm, reconsider. The CGI.pm
>makes this easy and the documentation is actually very useful.

I will check into it, thank you.

Thanks!

-----------------------------------------------------------------------
Next Meeting (w/ YLUG): June 16 (Fri) 19:00 Mizonoguchi Marui Family 12F
Next Technical Meeting: July 8 (Sat)  13:30 Topic: TBA
-----------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links