Skip to main content
replaced http://salesforce.stackexchange.com/ with https://salesforce.stackexchange.com/
Source Link

Update - this answer is about adding meta to Visualforce pages, not lightning components as originally asked

This seems to be a limitiation in Visualforce and Apex. Disclosure: I'm new to VF / Apex but very experienced in HTML. There are Apex-approved ways of adding scripts and stylesheets to the head of a document with the <apex:includeScript /> and <apex:stylesheet /> tags.

But there's no equivalent for adding meta as far as I know.

You can, as a type of hack, insert the <meta ... > at the top of the VF page and it may work. I've done a similar quick workaround with the <meta viewport...> element for responsive pages on mobile devices, and it works.

However, this is technically invalid markup.

A related answer at http://salesforce.stackexchange.com/a/5412/27617https://salesforce.stackexchange.com/a/5412/27617 has more details about adding meta

Update - this answer is about adding meta to Visualforce pages, not lightning components as originally asked

This seems to be a limitiation in Visualforce and Apex. Disclosure: I'm new to VF / Apex but very experienced in HTML. There are Apex-approved ways of adding scripts and stylesheets to the head of a document with the <apex:includeScript /> and <apex:stylesheet /> tags.

But there's no equivalent for adding meta as far as I know.

You can, as a type of hack, insert the <meta ... > at the top of the VF page and it may work. I've done a similar quick workaround with the <meta viewport...> element for responsive pages on mobile devices, and it works.

However, this is technically invalid markup.

A related answer at http://salesforce.stackexchange.com/a/5412/27617 has more details about adding meta

Update - this answer is about adding meta to Visualforce pages, not lightning components as originally asked

This seems to be a limitiation in Visualforce and Apex. Disclosure: I'm new to VF / Apex but very experienced in HTML. There are Apex-approved ways of adding scripts and stylesheets to the head of a document with the <apex:includeScript /> and <apex:stylesheet /> tags.

But there's no equivalent for adding meta as far as I know.

You can, as a type of hack, insert the <meta ... > at the top of the VF page and it may work. I've done a similar quick workaround with the <meta viewport...> element for responsive pages on mobile devices, and it works.

However, this is technically invalid markup.

A related answer at https://salesforce.stackexchange.com/a/5412/27617 has more details about adding meta

added 118 characters in body
Source Link

Update - this answer is about adding meta to Visualforce pages, not lightning components as originally asked

This seems to be a limitiation in Visualforce and Apex. Disclosure: I'm new to VF / Apex but very experienced in HTML. There are Apex-approved ways of adding scripts and stylesheets to the head of a document with the <apex:includeScript /> and <apex:stylesheet /> tags.

But there's no equivalent for adding meta as far as I know.

You can, as a type of hack, insert the <meta ... > at the top of the VF page and it may work. I've done a similar quick workaround with the <meta viewport...> element for responsive pages on mobile devices, and it works.

However, this is technically invalid markup.

A related answer at http://salesforce.stackexchange.com/a/5412/27617 has more details about adding meta

This seems to be a limitiation in Visualforce and Apex. Disclosure: I'm new to VF / Apex but very experienced in HTML. There are Apex-approved ways of adding scripts and stylesheets to the head of a document with the <apex:includeScript /> and <apex:stylesheet /> tags.

But there's no equivalent for adding meta as far as I know.

You can, as a type of hack, insert the <meta ... > at the top of the VF page and it may work. I've done a similar quick workaround with the <meta viewport...> element for responsive pages on mobile devices, and it works.

However, this is technically invalid markup.

A related answer at http://salesforce.stackexchange.com/a/5412/27617 has more details about adding meta

Update - this answer is about adding meta to Visualforce pages, not lightning components as originally asked

This seems to be a limitiation in Visualforce and Apex. Disclosure: I'm new to VF / Apex but very experienced in HTML. There are Apex-approved ways of adding scripts and stylesheets to the head of a document with the <apex:includeScript /> and <apex:stylesheet /> tags.

But there's no equivalent for adding meta as far as I know.

You can, as a type of hack, insert the <meta ... > at the top of the VF page and it may work. I've done a similar quick workaround with the <meta viewport...> element for responsive pages on mobile devices, and it works.

However, this is technically invalid markup.

A related answer at http://salesforce.stackexchange.com/a/5412/27617 has more details about adding meta

Source Link

This seems to be a limitiation in Visualforce and Apex. Disclosure: I'm new to VF / Apex but very experienced in HTML. There are Apex-approved ways of adding scripts and stylesheets to the head of a document with the <apex:includeScript /> and <apex:stylesheet /> tags.

But there's no equivalent for adding meta as far as I know.

You can, as a type of hack, insert the <meta ... > at the top of the VF page and it may work. I've done a similar quick workaround with the <meta viewport...> element for responsive pages on mobile devices, and it works.

However, this is technically invalid markup.

A related answer at http://salesforce.stackexchange.com/a/5412/27617 has more details about adding meta