What is the problem with this..page always refresh when you back(im newbie)

Started on the old forum in November 2010 · view the original in the archive · old links redirect here

5 replies · 687 views · started 16 years ago · 1 min read

3 participants
leadiztah Developer · 55 posts #1

i have a modified lava script... and im using XAMMP for testing the script..

i uploaded it to 20x.cc free host..

my question is..

why the page is always refresh if you press backspace or back?.. for example. you are in index.php and you go to inbox.php then if you press BACKSPACE (pc) or GO BACK one page located at upper left of the browser..(<) the page will refresh again.. why?..no history?.. ahmmm is there a problem with the header??..

<?php header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <?php include("core.php"); include("config.php"); check_injection(); echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";

echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; echo "<html xmlns="http://www.w3.org/1999/xhtml">";

that's my header..

plss help me.. it is too slow when the page history always refresh..

something else Fellow · 2,296 posts #2

remove:

<?php
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
?>
leadiztah Developer · 55 posts #3

i already move that header but the page is still refreshing when i press BACK..

what is the problem? 🙁

pmbguy Senior · 344 posts #4

most likely it "cached" lmao...

just remove that stuff n refresh a few times... if you surfing with tricks, it'll take longer to get updated... (that stuff sometimes goes via caching servers etc...)

also check in your core n config to check there's no headers set there too...

leadiztah Developer · 55 posts #5

and i know it is in cached.. BUT!!..

i tried to put the header of one of my script that doesn't refresh when you back....

i put it on my new script..

but its still refresh..

i think the problem is in the host or in my server? 20x.cc?.. what do you think?..

pmbguy Senior · 344 posts #6

check that you remove the header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); from every php file... this will create problems for you though, cause it will eventually stop checking for new messages, etc

that's why it's set not to cache so the page always gets an updated copy...

my advise is to prevent the reloading thing, use opera mini... cause then you can go back a page or two without having to reload pages... changing the headers will create more problems in the long run... (ie: i tried removed them before, but ended up putting them back again)

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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