how to create meta with @template?

11 views
Skip to first unread message

Luke

unread,
Sep 14, 2011, 11:05:23 AM9/14/11
to Google Web Toolkit
@Template("<meta name='description' content='{0}' />")
SafeHtml metaDescriptionHTML(String descriptionText);

i tried the above on gwt2.4 but i get error. can comments how to i
progromatically add meta on page?

Thomas Broyer

unread,
Sep 14, 2011, 11:32:40 AM9/14/11
to google-we...@googlegroups.com
May I ask why would you want to do that?
The only <meta/> that are not useless are only used at parse time (charset, viewport), and possibly by user agents that don't run JS (description, used by Google bots).

Luke

unread,
Sep 15, 2011, 9:39:47 AM9/15/11
to Google Web Toolkit
ya. it's for google bot to crawl. is gwt2.4 cant use this tag anymore?

Thomas Broyer

unread,
Sep 15, 2011, 9:55:19 AM9/15/11
to google-we...@googlegroups.com
Google bot won't execute your JS, so injecting a <meta> from JS is useless. That's totally independent from GWT.
Reply all
Reply to author
Forward
0 new messages