Adding MetaTags

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

Moderators: Alexander Halser, Tim Green

Adding MetaTags

Unread postby Lindsay Colahan » Tue Jan 23, 2018 5:26 am

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
Lindsay Colahan
 
Posts: 10
Joined: Thu Aug 07, 2014 9:54 pm

Re: Adding MetaTags

Unread postby Martin Wynne » Tue Jan 23, 2018 6:20 am

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.
User avatar
Martin Wynne
 
Posts: 2384
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Adding MetaTags

Unread postby Lindsay Colahan » Tue Jan 23, 2018 6:32 am

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 postby Lindsay Colahan » Tue Jan 23, 2018 6:33 am

Or are you using a separate parser?
Lindsay Colahan
 
Posts: 10
Joined: Thu Aug 07, 2014 9:54 pm

Re: Adding MetaTags

Unread postby Tim Green » Tue Jan 23, 2018 8:21 am

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
Tim Green
Site Admin
 
Posts: 20355
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: Adding MetaTags

Unread postby Martin Wynne » Tue Jan 23, 2018 11:51 am

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.
User avatar
Martin Wynne
 
Posts: 2384
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Adding MetaTags

Unread postby sizbut » Wed Jan 24, 2018 9:27 pm

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: 71
Joined: Fri Feb 02, 2007 11:58 pm

Re: Adding MetaTags

Unread postby sizbut » Tue Feb 13, 2018 2:33 pm

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.
sizbut
 
Posts: 71
Joined: Fri Feb 02, 2007 11:58 pm


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: hafidz othman and 8 guests