Adding MetaTags

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Lindsay Colahan
Posts: 10
Joined: Thu Aug 07, 2014 9:54 pm

Adding MetaTags

Unread post by Lindsay Colahan »

Hello,

Has anyone ever tried to add metatags for cache control, either in the Help & Manual project file or in the skin? I am totally new to using metatags, but I trying to find a way to deal with Chrome's sticky cache. Our web developer pointed me in the direction of metatags.

Thanks,

Lindsay
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Adding MetaTags

Unread post by Martin Wynne »

Hi Lindsay,

The H&M skins already include cache control meta tags, but it's a constant battle of wits with some browsers. For example Firefox ignores them if the page is loaded in an iframe.

I have found the best solution is to use the php file extension option instead of html. PHP files are expected to contain dynamic content (they don't have to), so the browser doesn't cache them. I can now update my Webhelp and have it instantly visible in every browser every time. There is a slight delay as the page runs through the PHP parser on the server, but it's barely noticeable.

And you can insert dynamic PHP content in your topic pages if you wish, such as the current date and time. Put it in the page template, or an HTML Code Block.

regards,

Martin.
Lindsay Colahan
Posts: 10
Joined: Thu Aug 07, 2014 9:54 pm

Re: Adding MetaTags

Unread post by Lindsay Colahan »

How do you publish the pages as PHP? I didn't even know that was an option.
Lindsay Colahan
Posts: 10
Joined: Thu Aug 07, 2014 9:54 pm

Re: Adding MetaTags

Unread post by Lindsay Colahan »

Or are you using a separate parser?
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Adding MetaTags

Unread post by Tim Green »

Hi Lindsay,
Lindsay Colahan wrote:How do you publish the pages as PHP? I didn't even know that was an option.
You can change the topic file extension to .php or .asp or anything else in Configuration > Publishing Options > WebHelp > HTML Export Options. Then it is up to you to add the appropriate PHP scripts to your templates, of course... 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Adding MetaTags

Unread post by Martin Wynne »

Tim Green wrote:Then it is up to you to add the appropriate PHP scripts to your templates, of course... 8)
Hi Lindsay,

But that is optional. A standard HTML web page works fine with a .php extension. Sorry, I don't know anything about .asp files on Windows servers.

One point to bear in mind is that most browsers won't render local .php files -- you just see the page source. But Microsoft Edge does, so in order to see your project locally after publishing, use Microsoft Edge.

regards,

Martin.
sizbut
Posts: 72
Joined: Fri Feb 02, 2007 11:58 pm

Re: Adding MetaTags

Unread post by sizbut »

Sometimes it just needs a little bit of sideways thinking. Browser and proxy server caching has been the bane of my life for years, not just in regard to H&M HTML outputs. So you can rest assured a little .php even though it contains not PHP experiment will begin tomorrow.

If this forum supported awarding stars you'd have one for the suggestion Martin. Bravo.
sizbut
Posts: 72
Joined: Fri Feb 02, 2007 11:58 pm

Re: Adding MetaTags

Unread post by sizbut »

I have a website which hosts over 70 documents output as sets of H&M HTML. To let users navigate between docs, its all accessed via an HTML page that defines a set of frames.

That's all password restricted by a corporate security server that provides the login page and is very slow to respond at time. Combine that with the caching even when told not to tendency of some browsers and we were forever seeing the login page getting loading into a sub-frame that wasn't suitable for it (slow security page serving and unresponsive login page design).

Having now changed the name of the framing page to .php, after a month of usage no-one has reported that error again.
Post Reply