As in
Caching Web Pages, you probably want to look in to using
Squid Cache to do the dirty work for you. Barring that, maybe you could store a date field in the DB and check if you need to resend. You can send your own "304" header using
CGI, after all.
By the way, you should probably be using placeholders, like this:
my ($file) = $dbh->selectrow_array("SELECT $image
FROM offerte
WHERE id=?", {}, $id);
It may not make a difference in your particular case, since you are using numeric data, but I'd argue it should be done out of principle. If you always use them, you don't have problems with mistyped data.
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.