Header code and video settings

Hi, as this isn’t really an urgent ‘help me’ question, I’ve just lumped the 2 subjects together here for ease, and hopefully simple questions.

1: In the ‘add code’ to the header section of page settings, when there is more than one instruction, does each instruction have to be between the style tags, or can they be put together under single opening and closing tags? If so, do you need line spaces or whatever?

2: I know a few of you use handbrake for encoding videos. What settings do you use for decent quality? And I assume different for a small video compared to a background video?

Cheers all, just trying to get my head around a few things in downtime.

My answer to No1. And probably someone who is much more experienced in code can add more or correct me…

But as I understand it, some code needs to be “isolated” within its own tag block, as if there is an error or something goes wrong any other code within that same block afterward will not run.

This though doesn’t effect functions or event based code. So if the code isn’t running straight away, and its a function or an event handler, I don’t think there is an issue with them being in the same script block.

P.S most of time, the script tags should be put in the footer.

1 Like

I agree with @PeteSharp. For the most part, you can have any number of code snippets without problem. As a general rule. CSS code would go into style tags, whilst script code would go between script tags. Unless specifically required, most script calls can go in the foot of the page whilst styling (CSS) code can go in the head. If you have PHP code that relates to the page as a whole, for example if you are using protected pages, such code will normally be the first item on the page (before the doctype declaration).

Code that is designed to actually show something on page will most often be added via a code bric positioned where it is needed to be displayed. In many cases, such code will be set between iFrame tags - but not always.

For video optimisation in HandBrake, the best setting to use in most cases will be as shown below.

For background videos, these can be made using the same settings, but should be short (about 10 second) clips that can loop. Ideally, they should be about 3 - 5 mb in size.

3 Likes

Thanks both. Fantastic info, as usual. Much appreciated.
I’ll have a good read of that when I’m back at the Mac.
Thanks very much.