![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2005
Posts: 20
Rep Power: 0
![]() |
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 |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#3 |
|
Newbie
Join Date: May 2005
Posts: 20
Rep Power: 0
![]() |
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
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#5 |
|
Newbie
Join Date: May 2005
Posts: 20
Rep Power: 0
![]() |
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 |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|