end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

Cache-Control: no-storeと autocomplete="off" で、ブラウザ キャッシュをoffる

当初、キャッシュされないようにするには? - とほほのWWW入門 を参考に

print "Content-type:text/html\n";
print "Pragma: no-cache\n";
print "Cache-Control: no-cache\n";
print "\n";

のような httpd header出力としましたが、 上手く動作しない。

どうやら

print "Content-type:text/html\n";
print "Pragma: no-cache\n";
print "Cache-Control: no-store\n";
print "\n";

のように、「Cache-Control: no-cache」→「Cache-Control: no-store」 とした上で、

更に、google chrome用には、

<form method="post" action="/form" autocomplete="off">

のようにformタグに「autocomplete="off"」を追加する必要があるみたい。