Hi I'm working with Perl to bild CGI web aplications and problems with i think browser cahche. It's a code with +- 2000 lines so i won't post the whole script. But I think the problem is some where in the HTTP header.
First I load the headers and footers from another server using the following:
# User agent object aanmaken
use LWP::UserAgent;
use HTTP::Request;
my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new<br>('GET','http://www.telfort.nl/inc/
+headers/header_belmobiel.php');
my $response = $ua->request($request);
my $header = $response->as_string();
### Opschonen $header
#my $headtemp;
#($headtemp,$header)= split(/\!/,$header,2);
#$header = "<!".$header;
my $request = HTTP::Request->new<br>('GET','http://www.telfort.nl/inc/
+footers/footer_belmobiel.php');
my $response = $ua->request($request);
my $footer = $response->as_string();
##########################################
I cut the Headers using split, not elegant but effective.
Then I write my own Header:
print "Cache-Control: no-cache\nPragma: no-cache\n"; ## caching tegen
+te gaan (speciaal wegens proxy-servers)
#print $cgi->header;
print "Content-type: text/html\n\n";
#### header van telfort #####
print $header;
After this I open a Template to show the content.
If you use the same search parameters in the script it keeps giving different results. If you start with parameters that are wrong it keeps telling the information was not found. Even when you change the parameters to absolute right ones.
Does anyone know the solution or can anyone give me directions to search for solutions. It could be a installation fault on the server but i'm don't have much knowledge of servers and software like apache.
Thanx
edited by ybiC: balanced <code> tags
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.