[ 
https://issues.apache.org/jira/browse/WICKET-4846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488615#comment-13488615
 ] 

J commented on WICKET-4846:
---------------------------

"Perhaps meta-tags should be placed first in head?"
I agree, as this otherwise (can) cause an  bug with w3c validation ( 
http://validator.w3.org/check) 

Try the following html (from wicket generated page) in validator:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="sv" lang="sv">
    <head><script type="text/javascript" 
src="./wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-ver-AF693F9AEA7DAE36FB3BEF4C9B6E56FB.js"></script>
<script type="text/javascript" 
src="./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1B9641CE844EAD23B727CA6374E9F870.js"></script>
<script type="text/javascript" 
src="./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-ver-EEC2BC02FF65D56808753C180512AFD5.js"></script>
<script type="text/javascript" 
src="./wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug-ver-026C80FCC144285CE42D8C218E44945E.js"></script>
<script type="text/javascript" id="wicket-ajax-debug-enable">
/*<![CDATA[*/
Wicket.Ajax.DebugWindow.enabled=true;
/*]]>*/
</script>
<script type="text/javascript" id="wicket-ajax-base-url">
/*<![CDATA[*/
Wicket.Ajax.baseUrl="newssearch?usertype=2";
/*]]>*/
</script>
<script type="text/javascript" 
src="./wicket/resource/se.lif.www.site.components.livesearch.wicket.AbstractDefaultAutoCompleteBehavior/fass-autocomplete-ver-41F1EA205AE1EECB7B88F6ACA243A24B.js"></script>
<link rel="stylesheet" type="text/css" 
href="./wicket/resource/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar-ver-1111C0CD028CE789C944B643663ABDFA.css"
 />
<script type="text/javascript" 
src="./wicket/resource/org.apache.wicket.devutils.debugbar.DebugBar/wicket-debugbar-ver-5DA982399914EE0FC9DEC795641D85F3.js"></script>
<script type="text/javascript" 
src="./wicket/resource/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal-ver-A8461C3EECDD1B955B6196E654287791.js"></script>
<link rel="stylesheet" type="text/css" 
href="./wicket/resource/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal-ver-2123B7EF99557C05DF0F17782FF111B8.css"
 />


        <meta charset="utf-8"/>
        <title>no</title>
        <meta name="description" content=""/>
     <body>       
    </body>
</html>


Gives validation error
" A charset attribute on a meta element found after the first 512 bytes.

        <meta charset="utf-8"/>"


Then move the metatags to before the script generation. It will now validate!
Reason is html 5 needs the meta before 512 bytes, it has changed since html 4 
(where it was more loose regarding that aspect.
Therefore the scripts and stuff should be generated after meta tags in header.





                
> meta viewport tag should be placed first in head
> ------------------------------------------------
>
>                 Key: WICKET-4846
>                 URL: https://issues.apache.org/jira/browse/WICKET-4846
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.0.0, 6.1.0, 6.1.1, 6.2.0
>            Reporter: Johannes Odland
>            Priority: Minor
>
> As the sequence of header contributions changed with wicket 6.0 viewport tags 
> from the page are now placed after css and javascript contributed from 
> subpages and components. 
> The meta viewport tag must be placed before any css is loaded for media 
> queries to work properly.
> Perhaps meta-tags should be placed first in head?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to