How to specify control caching using HTML meta

I have many .odt docs that I design in odt and then save as HTML. I am using LibreOffice 3.5.7.2.
Requirements: (1) to be able to edit the document or to cenvert the document to odt because that is where I do 98% of the work. (2) Insert cache control meta tags.

I have a need to specify some meta tags that control caching using HTML meta such as:

There are 2 ways to do it. (1) I can use plain text editor in the HTML form, then use LibreOffice to convert the document HTML to odt so that I can continue my editing in odt. If I do that, LibreOffice eats those tags. They just disappear. (2) I can use LibreOffice in .odt format and use the file |properties | custom-properties section to insert HTML tags. Unfortunately I do not see how to insert tags that are more complex than what the “properties” editor can handle which is it can only handle form name=”text”. Any reasonable suggestion will be appreciated. -thanks for reading

Hi Qubit, thanks for reading.
I have a website with about 100 pages. Every day I update about 5-10 of those pages in odt with information for students. Then I save it as HTML. (I keep the odt format for next time when I want to make changes.) Yes following save as HTML, I could run a script that would insert the HTML tags I need.
It may have to do something like:
if (“Cache-Control” is not in HEAD)
then insert these two lines in HEAD

//
Your suggestion definitely has merit. The script will have to be rerun every time I make changes to my files. But LibreOffice should also consider (1) not eating HTML tags inserted manually and (2) the properties editor should allow to insert HTML line of text that is just line of HTML like mine. And not eat it later.
Do you have a skeleton for such script that I could use?
BTW I wanted to give you up vote but the system does not let me (I need to be higher rank). --thanks

qubit hits you with his +10 karma stick

I think you should be able to upvote and comment now :slight_smile:

@jim22,

  1. Okay, have some more karma. You should be able to upvote now :slight_smile:
  2. Yes, LO should probably not eat these HTML tags. Please file a bug.
  3. Let’s see if I can make you a script for this…

Hi @jim22,

What’s your workflow like after you export the ODT to HTML?

Would it be possible to have a script that runs though the exported file(s) and inserts all of the appropriate meta tags for you?

Thanks Qubit again. I need 15 pts to vote you up. Anyway for other people-- here is a webpage that has some sed script. Did not do it yet, but looks like step in the right direction.
http://alvinalexander.com/linux-unix/sed-insert-before-after-line-text

Ah, excellent.

Just tried out the script. You can add multiple META tags by including a newline character in your changes.sed file:

//a\

\n

Good luck!

@jim22 – Hmm… think I finally wrangled that comment syntax into something that’s understandable :slight_smile: