Hello friends!!
I am having an issue.
I tried to remove the data cached in a page using the below header() functions.
Code: - header("Cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
-
Header("Pragma", "No-cache");
-
-
if ($_SESSION["base"] != "1") /* where the value for base assigned in previous page.*/
-
{
-
// When user attempts to go back after the session was destroyed
-
Header("Location:error.html");
-
}
-
User who try to refresh or push back/forward button will transferred to a page which contains the error message, so that, the main page becomes unavailable to the user.
This works perfectly in browsers like IE6+, Safari and Mozilla firefox. But, this doesn't work with Opera. I would be very happy, if some one resolves this issue for me.
Thanks a million in advance.
VJ.
2 2378 Atli 5,058
Recognized Expert Expert
Hi VJ.
Cache control isn't really something you can depend on 100%. As you have encountered, some browsers will ignore them, while others will only acknowledge some unique headers or meta tags.
You can't force browsers to do anything. You can ask them nicely, like your code does, but not all of them will listen to you.
Opera seems to have some problems with cache control, although their website states that it supports it.
Try writing your Pragma header like this, see if it helps, and add the Expires header: -
header("Pragma: no-cache");
-
header("Expires: -1");
-
thanks a lot..
I will try it..
VJ
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Frank Thorstens |
last post by:
Hi,
i try to give my script headers so the output text would be downloaded in
the client's browser and not displayed. But it doesn't work at all in my IE
6 and Opera.
<?
header("Content-Type: application/octet-stream");
header("Content-Length: 5");
header("Content-Transfer-Encoding: binary");
|
by: optimistx |
last post by:
How to build or find an object browser for javascript?
E.g. Delphi integrated developement environment ('ide') offers a very
practical object browser for Pascal language. When typing a name with a
dot you get a list of objects,properties and methods to select from.
When you select or type a methodname or function and the left
parenthesis , the system writes the possible argument types. With key
F1 one gets thorough description of the...
|
by: Ryan Stewart |
last post by:
In some situations, I'd like to put some content within a box with a header.
No real problem there. But what if I want the header to have something on
the left hand side as well as on the right, and possibly of different sizes?
The code I have included appears to work fine in IE 6.0, Mozilla 1.6, NN
7.1, and Opera 7.23, except that Opera chops off the bottom of the 'g' in
"Right". Padding problem? That's minor though. I'm curious if there's...
|
by: Massimiliano Alberti |
last post by:
My program is heavily template based, and I use the VC++, so I have to keep
the templates in the header file. My .cpp files are quite empty (they are
more a connection between header files). Now, my "problem" is that I can't
put the body of classless functions in the header files. I normally "solve"
this problem using the "inline" keyword (inline functions must be in header
files, but the compiler doesn't have to "inline" inline functions)....
|
by: matthurne |
last post by:
I just started learning C++ on my own...I'm using Accelerated C++.
Something it hasn't explained and I keep wondering about is how header
files actually work. I suspect it doesn't get into it because it is,
as the authors love to say, "implementation specific". If that's the
case, how does the compiler commonly handle them? I use Linux and gcc
specifically. Basically, I don't understand how a header file being
included makes a...
| |
by: ginnisharma1 |
last post by:
Hi All,
I am very new to C language and I got really big assignment in my
work.I am wondering if anyone can help me.........I need to port
compiler from unix to windows and compiler is written partially in c
and partially in fortran. I guess i need to change host specific files
to make it working. I wonder if standard header files are going to
change in this case.my current windows compiler doesn't have
sys/resource.h but unix compiler...
|
by: Markus Olderdissen |
last post by:
each web-page contains header and footer. if the web-page contains more
then one page i want to print its header and footer to each page. but
header is only printed on first page and footer on last page. how to do
this? how can i find out how many paper is needed?
|
by: Grischa Brockhaus |
last post by:
Hi,
I'm trying to produce a div layout containing a header on the top with fixed height, a footer on the
bottom using fixed height and a content layer using what's left of the browsers window.
So my header div is defined at top:0; height:40px , my footer is defined as bottom:0; height:40px
and the content is defined as top:40px;bottom:40px;
This works very well with firefox but doesn't work with IE, as IE ignores the bottom statement...
|
by: Joseph Geretz |
last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with
authenticated session information. Given the following implementation for
our Logout method, I vastly prefer to simply code m_Token = null in order to
destroy the session token when the user logs out. However, I'm finding that
setting class instance to null results in no header being sent back to the
client, with the result that the client actually remains with an...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |