Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 12th, 2006, 7:32 PM   #1
coldblue
Newbie
 
Join Date: May 2005
Posts: 20
Rep Power: 0 coldblue is on a distinguished road
Clearing cache

Hi i'm back i have not been on here is some time now how are you all

I wanted to know if it is possible that you can have a script that is on a page and when you load the page or refresh it it will clear your cache is this possible if not in javascript then is it possible in php cgi or asp ?

Thanks

Aaron
coldblue is offline   Reply With Quote
Old Feb 12th, 2006, 7:40 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You must have forgotten about searching and documentation. There are cache controls in PHP. Refer to the manual .
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Feb 12th, 2006, 7:44 PM   #3
coldblue
Newbie
 
Join Date: May 2005
Posts: 20
Rep Power: 0 coldblue is on a distinguished road
well i'm kinda n00b to all this php since i have a phpbb borad i'm learn parts here and there so that why i wondered if it would be possible to imbed a javascript code into a site so when you visit it or reload it it will clear your cache
coldblue is offline   Reply With Quote
Old Feb 12th, 2006, 8:11 PM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Reliance on JS may not be a good idea, as users may have JS disabled. You may force reloads in some browsers, at least, by requesting a page with a query string that hasn't been previously loaded. Again, read my previous post. PHP has cache controls. I would suggest that as the way to go. Here's an example:
header ("Cache-Control: no-cache, must-revalidate");
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Feb 13th, 2006, 6:36 AM   #5
coldblue
Newbie
 
Join Date: May 2005
Posts: 20
Rep Power: 0 coldblue is on a distinguished road
Umm what do i do with that code where do i put it on my html page

it's a for a project i'm working on i want the page to be able to reload after 5 secounds and clear the cache each time the page it opened
coldblue is offline   Reply With Quote
Old Feb 13th, 2006, 6:41 AM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Ahhhh, the light dawns. What you really want is finally presented in post 5, along with the idea that someone should do it for you. I suggest you review my responses as well as some HTML and Javascript material.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:32 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC