Focal Point
[CLOSED] HTML Code to Clear Browser Caching Issue

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4087054776

July 27, 2015, 12:52 PM
Jveselka
[CLOSED] HTML Code to Clear Browser Caching Issue
Back to it.....

I opened this last year and got busy with an upgrade and never got back with you guys.

We are now running on WF8 and we still have the same issue with caching when we move between our BETA and PRODUCTION servers.

I have tried putting this code in my HTML but it does not help or maybe I have it in the wrong place.

  <HEAD>

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">



We use junctions in the URL to point the link to the correct server but the HTML is not clearing the cookie when the page is loaded.

Beta Link - https://pd.txfb-ins.com/webfoc...menu_user_signon.htm
Prod Link - https://pd.txfb-ins.com/webfoc...menu_user_signon.htm

The below script runs before each screen is loaded and I think this is what needs to be cleared but I am not sure where the code is being generated.

  
<SCRIPT language="JavaScript">
<!-- 
document.cookie = "IV_JCT=%2Fwebfocusbeta8; path=/";
//--> 



Here is an example of the code that is caching...

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=9>
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=10>
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=11>
<META name=mycharsetmeta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<META name=Generation content="Created in release 8009, Generation 3">
<SCRIPT type=text/javascript>//confidential_id=IBI_OptionsScript
var szHtmlAlias="/ibi_apps/ibi_html";var szRunTimeHtmlAlias="runTimeHtmlAlias";var cgipath="cgipath";var ibirls="ibirls3";var rltdyncalendar="rltdyncalendar";var map="ibimap";var olap="olap";var olappanebase="olappanebase";var olapdrill="olapdrill";var ibiOptions = new Array(cgipath,ibirls);var nlsScript="/javaassist/nls.js";var glbScript="/javaassist/ibi/html/js/ibigbl.js";var replacePart="<replace>";
var scriptTemplate='<SCRIPT src="'+replacePart+'" type="text/javascript"><\/SCRIPT>';if(typeof(szRunTimeHtmlAlias) === 'string' && szRunTimeHtmlAlias.indexOf('/') == 0)szHtmlAlias=szRunTimeHtmlAlias;document.write(scriptTemplate.replace(replacePart, szHtmlAlias + nlsScript));document.write(scriptTemplate.replace(replacePart, szHtmlAlias + glbScript));</SCRIPT>
 
<SCRIPT type=text/javascript>//confidential_id=IBI_ibigblloadCss
if(typeof ibigblloadCss === 'function'){ibigblloadCss(null);addIntlTranslatedJS("composertrans.js");}else {alert("JavaScript alias '/ibi_apps/ibi_html'  is not valid");window.location("about:blank");}</SCRIPT>
<TITLE>HtmlPage</TITLE><LINK id=ITEM2 rel=stylesheet type=text/css UserSuppliedFullPath="1" rtFileName="cgipathsub/ibi_html/javaassist/ibi/html/composer/themes/nonBindows/IBI-Themes/default_theme.css"><LINK id=IBI_THEME_CSS rel=stylesheet type=text/css UserSuppliedFullPath="1" desc="Information Builders" rtFileName="cgipathsub/ibi_html/javaassist/ibi/html/composer/themes/nonBindows/IBI-Themes/ibi.css">
<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT> 

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8105m
Windows, All Outputs
July 29, 2015, 03:03 AM
StuBouyer
In the WebFOCUS Admin Console you can set the Cache-Control value.

By default it is public, max-age=2592000.

Open the Admin Console and Under "Application Settings" select "Filters".

Your browser and it's version will also play a part in this. I find that IE is very greedy on keeping hold of data and cookies. Even when all pages to WebFOCUS are closed, if another IE page is open then the session cookie may not be released.

Also different browsers use different META tags to control cache.

Here are a bunch that I've used in the past :
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />


But give the setting in the Webconsole a try first as that will simplify things for you.

Cheers

Stu

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.2.03 (8.2.06 in testing)
July 30, 2015, 04:18 PM
susannah
quote:
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=9>
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=10>
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=11>


interesting, jv... what does that quoted code do, actually?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 04, 2015, 10:50 AM
Jveselka
StuBouyer

So what would we set the control to, 0?

Susannah
I am not sure I found this online and I assume it is supposed to hold the compatibility settings when moving from one WF page to another.

A lot of our users are complaining that they have to keep resetting the compatibility settings each time they load our WF pages. We also have problems with the RUN button not working. You have to click tools and then compatibility mode to get it to start working again. As far as I know this seems to have helped.

The big issue is the caching......

Thanks
JV


WebFOCUS 8105m
Windows, All Outputs
August 04, 2015, 11:21 AM
susannah
HMMM. thanks. i'll put that code in every launch page....




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 04, 2015, 01:16 PM
Jveselka
I tried changing the setting and that did not help, FYI this is a IE problem for sure as I tried to load both BETA and PROD links with Firefox and all worked as it should.

I also tried using the other meta code with no luck.

Do you know where the following java script is run from? the IV_JCT=%2Fwebfocusbeta8 is what I think needs to be cleared each time. As you can see the meta code comes after it and by that time it is too late.

 <SCRIPT language="JavaScript">
<!-- 
document.cookie = "IV_JCT=%2Fwebfocusbeta8; path=/";
//--> 


</SCRIPT>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<!-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=9>
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=10>
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=11>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
 



WebFOCUS 8105m
Windows, All Outputs
August 05, 2015, 10:15 PM
StuBouyer
What did you set the IBI_HTTP_Response_Header.Cache-Control value too?

I woulds try "no-cache, max-age=0"

Also try setting IBI_HTTP_Response_Header.expires to a small value 0 or 60 (one minute)

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
August 10, 2015, 08:59 AM
Jveselka
I had it set to

IBI_HTTP_Response_Header.Cache-Control = public, max-age=1

and

IBI_HTTP_Response_Header.expires = 1

I will try setting them both to 0 and replace public with no-cache,

THanks


WebFOCUS 8105m
Windows, All Outputs
August 10, 2015, 09:05 AM
Jveselka
Also is a reboot required for this change?


WebFOCUS 8105m
Windows, All Outputs
August 11, 2015, 03:18 PM
Jveselka
Still not working with change and reboot. Any other suggestions?

Thanks
JV


WebFOCUS 8105m
Windows, All Outputs
August 11, 2015, 11:30 PM
StuBouyer
Have a look at what is being passed through in the HTML headers now.

you should be able to use Chrome or Firefox's developer tools to see the HTML headers.

Also depending on the browser you may need to clear your browser cache - especially if the content is already cached


WebFOCUS 8.2.03 (8.2.06 in testing)
August 12, 2015, 04:14 AM
Wep5622
quote:
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=9>
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=10>
<META id=RLT_STANDARDS_MODE_META http-equiv=X-UA-Compatible content=IE=11>


This should tell various Internet Explorer versions that they should not use "compatibility mode" for this HTML. The id-tags were probably initially added by WebFOCUS and then incorrectly (id attributes are supposed to be unique on a page) copied. I suspect WF is also responsible for turning this into dubious HTML by removing the attribute quotes, exposing the equals sign in the attribute value to the HTML interpreter.

Cleaned up, the HTML would read as below:
<META http-equiv="X-UA-Compatible" content="IE=9">
<META http-equiv="X-UA-Compatible" content="IE=10">
<META http-equiv="X-UA-Compatible" content="IE=11">



WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
August 12, 2015, 10:05 AM
Jveselka
This seems to be an IE (We use IE10 & IE11) issue because this process works fine in Firefox / Chrome.

I made the change Wep5622 but it didn't help.

Can anyone tell me what is generating this code. It is not in any of my HTML code but when I look at the source code it is there. To me this is what needs to be cleared but it runs before any of my code so all the META code I am putting in seems to be running to late.

<script language="JavaScript">
< !--
document.cookie = "IV_JCT=%2Fwebfocusbeta8; path=/";
//-->


WebFOCUS 8105m
Windows, All Outputs
August 13, 2015, 10:58 AM
Jveselka
This looks like something (PD) Policy Director is running. Anyone know how to clear this on the fly?

THanks
JV


WebFOCUS 8105m
Windows, All Outputs