Alternative to requiring users clear their browser cache
Alternative to requiring users clear their browser cache
We deploy a WebHelp help system to our end users. Currently, it seems that the only way end users can see new topics added to the TOC is if they clear their browser cache. Is there an alternative to this? We do not wish to require users to clear their browser's cache every time an updated help system is deployed.
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Alternative to requiring users clear their browser cache
Yes, you can modify the header of the pages setting the expiration date to the past or zero as well as specifying the cache control properties. See here: http://stackoverflow.com/questions/4954 ... l-browsers
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Alternative to requiring users clear their browser cache
Is there a setting within Flare that can achieve this? Manually adding code to the headers of HTML pages doesn't seem like an ideal solution.
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Alternative to requiring users clear their browser cache
Not that I know of. Typically, caching is intended behavior. As the linked page shows, there is a way to disable caching from within the Apache .htaccess file. Here is a link on how to do this through IIS http://forums.iis.net/t/1175971.aspx
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Alternative to requiring users clear their browser cache
Is it just the TOC file that I need to prevent from caching? If so, can you tell me where in the Flare output I can find the file that I need to prevent from caching?
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Alternative to requiring users clear their browser cache
I don't think it is just the ToC. First candidate for me would be default file that loads the rest of the help. When I recall correctly, those are stored here
C:\Program Files (x86)\MadCap Software\MadCap Flare V9\Flare.app\Resources\WebHelp
Before you make changes to these files, make a backup so that you can put back the original files in case something does not work out. Also, editing these files will impact all projects.
As for each topic, you should be able to add the changes to the header to the master page and get it added into each topic.
Also, this is theory, I never tried this out because I never got into that situation with WebHelp yet. But if I had to fix this, the above would be my approach.
C:\Program Files (x86)\MadCap Software\MadCap Flare V9\Flare.app\Resources\WebHelp
Before you make changes to these files, make a backup so that you can put back the original files in case something does not work out. Also, editing these files will impact all projects.
As for each topic, you should be able to add the changes to the header to the master page and get it added into each topic.
Also, this is theory, I never tried this out because I never got into that situation with WebHelp yet. But if I had to fix this, the above would be my approach.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Alternative to requiring users clear their browser cache
The no cache code can be added to a master page. In so doing you add the code once and it is applied to all topics in the project.
<head>
<META http-equiv="Cache-Control" content="no-cache" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Expires" CONTENT="-1" />
</head>
<head>
<META http-equiv="Cache-Control" content="no-cache" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Expires" CONTENT="-1" />
</head>
Re: Alternative to requiring users clear their browser cache
This doesn't seem to be working. But I'm not certain I'm adding the cache code to the master page correctly.
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Alternative to requiring users clear their browser cache
It needs to be part of the head section, not the body. The position in the head section should be irrelevant. Do you see these entries in the generated output files? Also, you will need to clear the browser cache one more time because the browser still thinks it has a valid cached copy of the file. After that you should be fine.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Alternative to requiring users clear their browser cache
Note that adding this to the master page will only include it in topics - it's not going to affect the TOC, which was the issue mentioned.
Presumably if you want to use this technique to update the TOC, the meta tags need to be in the main help file.
Flare v10 allows you to add meta tags to the main help file (via the target).
Presumably if you want to use this technique to update the TOC, the meta tags need to be in the main help file.
Flare v10 allows you to add meta tags to the main help file (via the target).
Re: Alternative to requiring users clear their browser cache
You are using terms that I'm not sure what you mean. What do you mean by "head section" and "main help file."
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Alternative to requiring users clear their browser cache
By "head section" I meant the portion of the HTML between the <head> tags.
Can't speak for Dave here, but I assume he means the file that you specify in CHS calls as the 'base' file. I think it is called default_CSH.htm if you did not specify a different name. That file will load in all the other components of the help.
If you have a need to directly access topic files then the master page will also need these entries.
Can't speak for Dave here, but I assume he means the file that you specify in CHS calls as the 'base' file. I think it is called default_CSH.htm if you did not specify a different name. That file will load in all the other components of the help.
If you have a need to directly access topic files then the master page will also need these entries.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Alternative to requiring users clear their browser cache
So I've added the code below between the <head> of the master page, the /output/mywebhelp/default_csh.htm file, and the output/mywebhelp/skin/toc.htm file. I still have to clear my browser cache in order to see any updates made to the TOC.
<META http-equiv="Cache-Control" content="no-cache" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Expires" CONTENT="-1" />
<META http-equiv="Cache-Control" content="no-cache" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Expires" CONTENT="-1" />
Re: Alternative to requiring users clear their browser cache
I have the same question.
Did you find an answer in the meanwhile? I would be much interested.
Did you find an answer in the meanwhile? I would be much interested.
-
smajors
- Sr. Propeller Head
- Posts: 180
- Joined: Mon Oct 21, 2013 9:28 am
- Location: Midwest United States
Re: Alternative to requiring users clear their browser cache
I don't see a head tag in the skin html, do you add one?
Technical Writer
Training & Development Team/Marketing Department
Training & Development Team/Marketing Department
Re: Alternative to requiring users clear their browser cache
You can add meta tags to the output via the target.
See the help here:
http://webhelp.madcapsoftware.com/flare ... a_Tags.htm
See the help here:
http://webhelp.madcapsoftware.com/flare ... a_Tags.htm
-
jknasinski
- Propeller Head
- Posts: 36
- Joined: Tue Jul 10, 2012 9:31 am
- Location: Milwaukee Wisconsin
Re: Alternative to requiring users clear their browser cache
There are a couple of ways to fix it. It the target in Flare in the Advanced tab you can add meta tags such as:
<META http-equiv="Cache-Control" content="no-cache" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Expires" CONTENT="-1" />
My dev team looked at that and said it would work but didn't want to test each browser so they came up with a web.config file that they are adding to the help deployment that prevents caching in IIS. That works fine. We just include the small web.config file in the same folder that they deploy the help files to.
<META http-equiv="Cache-Control" content="no-cache" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Expires" CONTENT="-1" />
My dev team looked at that and said it would work but didn't want to test each browser so they came up with a web.config file that they are adding to the help deployment that prevents caching in IIS. That works fine. We just include the small web.config file in the same folder that they deploy the help files to.
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Alternative to requiring users clear their browser cache
Can you share what the entries in web.config are to prevent client side caching? Thanks in advance!
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
-
jknasinski
- Propeller Head
- Posts: 36
- Joined: Tue Jul 10, 2012 9:31 am
- Location: Milwaukee Wisconsin
Re: Alternative to requiring users clear their browser cache
The web.config file my dev team created is:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>
</system.webServer>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>
</system.webServer>
</configuration>
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Alternative to requiring users clear their browser cache
Thank you very much for posting this.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
-
smajors
- Sr. Propeller Head
- Posts: 180
- Joined: Mon Oct 21, 2013 9:28 am
- Location: Midwest United States
Re: Alternative to requiring users clear their browser cache
Do you need to separate these by commas? I added the meta tags to the Target but now is showing in the head of my default file in the output. I removed the tags from the head in the default file itself and that didn't seem to remove it so wondering where this output is coming from.jknasinski wrote:There are a couple of ways to fix it. It the target in Flare in the Advanced tab you can add meta tags such as:
<META http-equiv="Cache-Control" content="no-cache" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
<META HTTP-EQUIV="Expires" CONTENT="-1" />
You do not have the required permissions to view the files attached to this post.
Technical Writer
Training & Development Team/Marketing Department
Training & Development Team/Marketing Department
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Alternative to requiring users clear their browser cache
The lines are within the <body> tag of your page, that is why they show in the output. The entries need to go into the <head> section of the file, not to be confused with the header of a master page which is part of the <body>.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U