473,320 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

header functions doesn't work with Opera Why?

vijcbe
16
Hello friends!!
I am having an issue.

I tried to remove the data cached in a page using the below header() functions.

Code:
Expand|Select|Wrap|Line Numbers
  1. header("Cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
  2. Header("Pragma", "No-cache");
  3.  
  4. if ($_SESSION["base"] != "1") /* where the value for base assigned in previous page.*/
  5. {
  6. // When user attempts to go back after the session was destroyed
  7. Header("Location:error.html");
  8. }
  9.  
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.
Oct 22 '07 #1
2 2360
Atli
5,058 Expert 4TB
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:
Expand|Select|Wrap|Line Numbers
  1. header("Pragma: no-cache");
  2. header("Expires: -1");
  3.  
Oct 23 '07 #2
vijcbe
16
thanks a lot..
I will try it..
VJ
Oct 24 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

18
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. <?...
1
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...
0
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,...
1
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,...
16
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...
8
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...
14
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...
11
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. ...
4
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.