Jul 20, 2008

Why Do I Have To Force A Refresh?

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Why Do I Have To Force A Refresh?

fsoftball
This may or may not be PHP related; I am THAT much of a newbie.

It seems like I need to force my browser to NOT use a cahced view of pages I create using PHP. Is there any way I can make it sound refresh every time the page is loaded?

Reply

lamode
i dont quite sure what u mean, but you can try ctrl+f5. that hot key does the refresh page job in internet explorer.

Reply

dodgerblue
If you're using IE

Go to Tools > Internet Options.

Under the General tab (which should be the first tab you see), there is a section called Temporary Internet Files, with the description Pages you view on the Internet are stored in a special folder for quick viewing later.

Right under that there are three buttons. Delete Cookies, Delete Files and Settings.

Click on Settings.

A dialog box will pop up which says Check for newer versions of stored pages:

Select Every visit to the page (the first option).

Click OK for this dialog box, and Apply for the Internet Options window.

All set.


If you're using Firefox

Go to Tools > Options.

Under the Privacy tab (which is denoted by a yellow lock icon on the left sidebar), there is a list of options for which you can change the privacy settings.

The last option in this list says Cache. Click on the little + icon.

Where it says Use up to: [ box ] KB of disk space for the cache, change the number in the box to 0 (default is 50000 KB).

Click OK.

All set.

 

 

 


Reply

leiaah
I don't know if this is related but I'M LOOKING FOR A CODE THAT AUTOREFRESHES THE PAGE EVERY 2 MINUTES. I've created a thread for this last week but no one seemed to understand it. Does anyone know how? smile.gif

Reply

SystemWisdom
You could use a META tag for that effect, it is part of the HTML standard so it is client-side code, and nearly all browsers recognize it.. It is not PHP related..

An example of the tag you need:

Example filename = index.html
CODE

<html>
<head>
<meta http-equiv="Refresh" content="120;URL=index.html">
</head>
<body>
blah blah blah..
</body>
</html>


That should work!

Reply

fsoftball
Thanks SystemWisdom.

Can you please explain what the code will actually do?

Reply

Ao)K-General
I tried a refresh code and it always took me from one page to the page I wanted to refresh. So I took it out and never used it again. Some times they don't work the way you want em to. And sometimes you just need to put it in the right file which I will not do. I don't wanna screw something up.

Reply

mobious
i think you are referring to your pages being cached by browsers rather than literally refreshing the page. add this to evry page to prevent browsers from cahing your php pages.

CODE
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

or

CODE
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

Reply

iGuest
This site is very useful to me thanks a lot.


-reply by madhuri

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. why do i have to refresh everytime i return to a page - 9.73 hr back. (1)
  2. internet explorer 7 force page refresh - 10.37 hr back. (1)
  3. forcing refresh php - 36.15 hr back. (3)
  4. force refresh page - 38.73 hr back. (1)
  5. firefox force refresh page - 40.98 hr back. (1)
Similar Topics

Keywords : force, refresh

  1. Refresh Problem
    On Refreshing a Submitted Form (3)


      Looking for force, refresh

Searching Video's for force, refresh
advertisement



Why Do I Have To Force A Refresh?



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE