Prevent Caching Pages

Started on the old forum in April 2008 · view the original in the archive · old links redirect here

15 replies · 1,237 views · started 18 years ago · 1 min read

6 participants
alesh Lead · 604 posts #1

i wanna knw is it possible 2 prevent caching pages....

i have no problem with this.... but it wont show all of letters tht i use (š đ ž č ć) when users posting replys/inboxing etc.... it shows sum strange hieroglyphics when š đ ž č ć r in use... lol

header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo("<?xml version=\"1.0\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

so i changed lil bit

header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Cache-Control: no-store; no-cache; must-revalidate");
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

and tht way letters š đ ž č ć r visible normal at all browsers....

but then starts the problem.... pages r caching as hell.... u read the PM but it stays as unreaded, u post a reply but theres no reply..... i mean reply is posted sucesfully, but tht page i cached and u always get the same old page....lol

so is there a way 2 prevent caching pages??

eeeeerrr....

crazybrumi Super moderator Principal · 1,064 posts #2

try

header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-type: text/vnd.wap.wml"); 
echo "<?xml version=\"1.0\"?>"; 
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; 
echo "<wml>";

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

alesh Lead · 604 posts #3

try

header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-type: text/vnd.wap.wml"); 
echo "<?xml version=\"1.0\"?>"; 
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; 
echo "<wml>";

cn i use it like this:

header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Pragma: no-cache");
header("Cache-Control: no-store; no-cache; must-revalidate");
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

cuz without UTF-8 encoding im unable 2 get š đ ž č ć letters

eeeeerrr....

modfiles Developer · 200 posts #4

try changing this echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");

to this echo"<?xml version=\"1.0\" encoding=\"UTF-8\"?>";

metulj Super moderator Principal · 1,726 posts #6

Evin that is strange to me

č š ž ć đ

aka

ccaron scaron zcaron etc

mostly used in former yugoslavia republic

some other countrys use those chars too External image (may be gone)

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

crazybrumi Super moderator Principal · 1,064 posts #7

cn i use it like this:

header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Pragma: no-cache");
header("Cache-Control: no-store; no-cache; must-revalidate");
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

cuz without UTF-8 encoding im unable 2 get š đ ž č ć letters

try it a dont c why not

Want something coded email me at sales@webnwaphost.com for a prices.

http://flagcounter.com/more/W80q

metulj Super moderator Principal · 1,726 posts #8

cn i use it like this:

header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Pragma: no-cache");
header("Cache-Control: no-store; no-cache; must-revalidate");
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

cuz without UTF-8 encoding im unable 2 get š đ ž č ć letters

try it a dont c why not

it wont work correctly... i use that.. and alesh complains that he got problems whenever he visits my site LOL

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

alesh Lead · 604 posts #9

it wont work correctly... i use that.. and alesh complains that he got problems whenever he visits my site LOL

actualy it works...... tht pragma shit prevent caching pages..... even with included UTF-8 encoding lol even with older phns is fine

eeeeerrr....

Guest #10

u may use this

header("Cache-Control: no-cache, must-revalidate"); // Prevent caching, HTTP/1.1 header("Pragma: no-cache"); //header('Content-type: application/vnd.wap.xhtml+xml'); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";

metulj Super moderator Principal · 1,726 posts #12

actualy it works...... tht pragma shit prevent caching pages..... even with included UTF-8 encoding lol even with older phns is fine

hmm.. how come you got problems on my site then?? lol

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

blackhowk Senior · 411 posts #13

u may use this

header("Cache-Control: no-cache, must-revalidate"); // Prevent caching, HTTP/1.1 header("Pragma: no-cache"); //header('Content-type: application/vnd.wap.xhtml+xml'); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";

yeap use this and insert into url time...as variable.

metulj Super moderator Principal · 1,726 posts #14

yeap use this and insert into url time...as variable.

can you post just simple example on this one?

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

alesh Lead · 604 posts #15

hmm.. how come you got problems on my site then?? lol

cuz u missed this:

header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Pragma: no-cache");    <------------------------ without this lil older phns got trouble with cache
header("Cache-Control: no-store; no-cache; must-revalidate");
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

this works just fine, excatly how i wanted


header("Cache-Control: no-cache, must-revalidate"); // Prevent caching, HTTP/1.1
header("Pragma: no-cache");
//header('Content-type: application/vnd.wap.xhtml+xml'); 
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";

this is no use 4 me...... no uTF-8 encoding..... it wont show letters š đ ž č ć at all phns...


btw metulj, i think blackhawk thought sumthn like this

header("Content-type: text/vnd.wap.wml");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                // expires in the past
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");     // Last modified, right now
  header("Cache-Control: no-cache, must-revalidate");            // Prevent caching, HTTP/1.1
  header("Pragma: no-cache");
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";

its from lava chat....

eeeeerrr....

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close