Force Reload of TOC after publishing new content

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets

Force Reload of TOC after publishing new content

Postby le_sloth on Thu Jun 10, 2010 1:58 am

Hi

When I publish updated content to my WebHelp project (in which I've added/reorganised some of the TOC), the TOC doesn't get refreshed i.e. still shows the old content. Is there a way to force this to reload? Seems to be more of a problem in FireFox and Chrome than IE.

BTW, I don't mean using This Frame > Reload Frame - need something to happen automatically as don't want to have to tell our end-users to do this each time we publish something.

thanks

Richard
---
Using Flare 7.0
le_sloth
Propeller Head
 
Posts: 21
Joined: Sun May 20, 2007 11:16 pm

Re: Force Reload of TOC after publishing new content

Postby LTinker68 on Thu Jun 10, 2010 8:11 am

Browsers by default will load content from the cache if they see you're going to the same site, unless the page has server-side code that runs, like .asp and .aspx, in which case it would reload the entire page. Some browsers allow you to override the default behavior, but it's something that has to be modified in the browser, so it's on a user-by-user basis. I believe there is JavaScript code you can insert into a page that forces the page to be loaded entirely and not from the cache, but you'd have to do some research to find the code.

Long story short, it's a browser thing not a Flare thing, although you could certainly submit a feature request at http://www.madcapsoftware.com/bugs/submit.aspx asking them to add an option that when enabled would automatically insert the appropriate JavaScript code to force a full page load.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: Force Reload of TOC after publishing new content

Postby RamonS on Thu Jun 10, 2010 12:57 pm

You don't need slow JavaScript for that. It is a matter of setting proper expiration dates in the headers of the HTML files. Ideally, those are configurable from always expire (setting it to a date that is always in the past) or any other specific or relative date. That is what the HTTP cache-control directive and the Expires HTTP header field are for.
RamonS
Senior Propellus Maximus
 
Posts: 4266
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Force Reload of TOC after publishing new content

Postby LTinker68 on Thu Jun 10, 2010 1:23 pm

There you go. It would be easy enough to add those types of field declarations in the masterpage, or maybe just in the "welcome" page, but if you use CSH then the users might not always go to the welcome page, so the masterpage might be better. Although I'm not sure if putting it in the masterpage would force only the topic to be loaded or if it would force the whole website and therefore the TOC pane, too. RamonS, do you know how those headers work when they're in a topic in a frameset? Do the headers need to be added to the frameset file instead? (Hopefully not, since that would require a manual modification of the frameset files after every build or a modification of the files in the program files folder.)
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: Force Reload of TOC after publishing new content

Postby RamonS on Thu Jun 10, 2010 7:02 pm

I'd assume that putting them into the document that gets loaded into the frameset is enough, but that requires to also add it to the ToC frame. The topics alone are probably not enough. There are also some other tricks one can pull. I use it in a web application...would need to dig up the code. My approach is probably over the top as I took every means of expiring a page and put it in there. This is what I do when I have no real clue about what I am doing. Nevertheless, the cache and expiration settings in the header are straight forward and documented in the HTTP spec here:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
See sections 14.9 and 14.21.
RamonS
Senior Propellus Maximus
 
Posts: 4266
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Force Reload of TOC after publishing new content

Postby le_sloth on Fri Jun 11, 2010 7:42 am

OK, thanks for the replies - I vaguely understand.

It's only the TOC that needs refreshing each time new content is loaded, so any header should go in the /Skin/Toc.htm file - is that right?

Say I want this to stay in the cache for 24 hours max, what header do I need to set?

thanks
---
Using Flare 7.0
le_sloth
Propeller Head
 
Posts: 21
Joined: Sun May 20, 2007 11:16 pm

Re: Force Reload of TOC after publishing new content

Postby lacastle on Wed Jul 13, 2011 1:17 pm

Did this ever get fixed? I have the same problem with my TOC not reloading when i publish to a web server.
User avatar
lacastle
Propellus Maximus
 
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE

Re: Force Reload of TOC after publishing new content

Postby MinnesotaCory on Wed Jul 13, 2011 1:23 pm

This is what I have in my MasterPage(s) to force a reload every 5 minutes and prevent caching. I did some digging and I think I found this on http://www.w3schools.com

Code: Select all
    <head>
      <meta http-equiv="refresh" content="600" />
      <meta http-equiv="pragma" content="no-cache" />
    </head>

-CK
If you plan to communicate you must prepare to be misunderstood or ignored.
MinnesotaCory
Propeller Head
 
Posts: 30
Joined: Tue Jan 25, 2011 3:40 pm
Location: Marshall, MN

Re: Force Reload of TOC after publishing new content

Postby lacastle on Wed Jul 13, 2011 1:52 pm

MinnesotaCory wrote:This is what I have in my MasterPage(s) to force a reload every 5 minutes and prevent caching. I did some digging and I think I found this on http://www.w3schools.com

Code: Select all
    <head>
      <meta http-equiv="refresh" content="600" />
      <meta http-equiv="pragma" content="no-cache" />
    </head>

-CK


Thanks, but this did not force my TOC to reload without the existing cache. where do i add the no-cache code for that?
User avatar
lacastle
Propellus Maximus
 
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE

Re: Force Reload of TOC after publishing new content

Postby MinnesotaCory on Wed Jul 13, 2011 1:55 pm

For me it forces a reload of the whole frameset. I do remember having problems with browsers that were already running on a cached copy after I added the code. After re-starting the browser it reloads the whole frameset every 5 minutes.
If you plan to communicate you must prepare to be misunderstood or ignored.
MinnesotaCory
Propeller Head
 
Posts: 30
Joined: Tue Jan 25, 2011 3:40 pm
Location: Marshall, MN

Re: Force Reload of TOC after publishing new content

Postby lacastle on Wed Jul 13, 2011 2:08 pm

Searching through the Output/Data files led me to Toc.xml, which looks like it's not being refreshed in the browser. The correct Toc.xml is loaded on the server, but isn't refreshing. I just manually opened http://..../Data/Toc.xml and pressed F5 to refresh the screen. When I went back to webhelp.htm, the TOC was updated.

Now, how do I get Toc.xml to refresh automatically?
User avatar
lacastle
Propellus Maximus
 
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE

Re: Force Reload of TOC after publishing new content

Postby LTinker68 on Wed Jul 13, 2011 6:03 pm

Toc.xml is called by Toc.htm, I think, so you should be able to put that same code into that file, although you'll have to do it every time you do a rebuild.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: Force Reload of TOC after publishing new content

Postby lacastle on Thu Jul 14, 2011 9:41 am

Adding the meta tags to Toc.htm did not work to refresh Toc.xml.
Now I'm looking for some sort of inline refresh code (javascript?) that i can add to the Toc.xml call, since technically the xml page doesn't have a <head> where I can add a meta tag.

Does everyone else not have this problem with the TOC not updating automatically? I don't know what makes my current project different from other ones, or what makes my current browser want to save the cache version.
User avatar
lacastle
Propellus Maximus
 
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE

Re: Force Reload of TOC after publishing new content

Postby LTinker68 on Thu Jul 14, 2011 10:10 am

Most of my projects are print, not WebHelp, and when it's been in WebHelp it's been when it's run from the local computer, not a web server. So it was only recently I noticed the problem -- I don't know if it's always been there. It seems to be more noticeable in Firefox than IE, oddly enough. I can't remember if I noticed it in Chrome.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: Force Reload of TOC after publishing new content

Postby lacastle on Thu Jul 14, 2011 10:31 am

I have no idea what [finally] happened, but my TOC is fine now. And I've tested it 3 times with little changes uploading to the server. (But I'm still holding my breath for it to keep working.)
To recap what I did:
-added meta refresh tags to my masterpage (to go on all my content pages)
-do not add meta refresh tags to Toc.htm (I tried it 1x but didn't notice a difference, and never edited it post-processing again)

LTinker68 wrote:It seems to be more noticeable in Firefox than IE, oddly enough. I can't remember if I noticed it in Chrome.

My webhelp works fine in Firefox and IE8. I don't have Chrome to test.
User avatar
lacastle
Propellus Maximus
 
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE

Re: Force Reload of TOC after publishing new content

Postby Pannonian on Fri Aug 19, 2011 2:24 am

just adding this tag to the masterpage didn't help.

Is there any workaround for the not-reloading problem? (tbh it is getting on my nerves to say 50 people in our company to clear their cache every 3 days...)
Pannonian
Propeller Head
 
Posts: 20
Joined: Tue Jan 11, 2011 2:53 am
Location: Vienna, Austria

Re: Force Reload of TOC after publishing new content

Postby JeremyTaylor on Tue Apr 28, 2015 3:05 am

Add the meta tags
<meta http-equiv="refresh" content="600" />
<meta http-equiv="pragma" content="no-cache" />
or similar in the Advanced tab in the target - look for the Add meta tags to content: field
JeremyTaylor
Jr. Propeller Head
 
Posts: 6
Joined: Tue Apr 28, 2015 3:00 am

Re: Force Reload of TOC after publishing new content

Postby Fiona on Thu Sep 13, 2018 3:33 am

Just come across this issue...I'm using Flare 12, HTML5 help and viewing it on Firefox. I'll try adding the metatags and see if that sorts it...
Fiona
Propeller Head
 
Posts: 70
Joined: Tue Jan 27, 2015 7:44 am
Location: U.K.


Return to Web-based Outputs

Who is online

Users browsing this forum: No registered users and 7 guests