Forum Replies Created

Viewing 15 replies - 31 through 45 (of 54 total)
  • Thread Starter cluster666

    (@cluster666)

    ugh, currently they are placed between my hreflang tags …
    is there any way to move them in last order before </head> ?
    Regards, Ralph

    Thread Starter cluster666

    (@cluster666)

    OK, I understand, but there is one script left in header which is not moved into the footer:

    <script type=”text/javascript”>
    var bhittani_plugin_kksr_js = {“nonce”:”1e5464eae6″,”grs”:true,”ajaxurl”:”https:\/\/www.mydomain.tld\/wp-admin\/admin-ajax.php”,”func”:”kksr_ajax”,”msg”:”Rate this post”,”fuelspeed”:400,”thankyou”:”Thank you for your vote”,”error_msg”:”An error occurred”,”tooltip”:”0″,”tooltips”:[{“tip”:””,”color”:”#ffffff”},{“tip”:””,”color”:”#ffffff”},{“tip”:””,”color”:”#ffffff”},{“tip”:””,”color”:”#ffffff”},{“tip”:””,”color”:”#ffffff”}]};
    </script>

    Thread Starter cluster666

    (@cluster666)

    thank you, it looks much better now ??
    a last question, can Autoptimize move java script snippets added by a plugin into the footer too?
    fex:

    <script type=”application/ld+json”>
    </script>
    and
    <script type=”text/javascript”>
    </script>

    Thread Starter cluster666

    (@cluster666)

    thanks Frank, it seems to work – except the </script> part for $out3, did not add the break …
    I’m doing something wrong here?

    add_filter(‘autoptimize_html_after_minify’,’cluster_html_minify’,10,1);
    function cluster_html_minify($in) {

    $out0 = preg_replace(‘/^\s+|\s+$/m’, ”, $in);
    $out1 = str_replace(“</style>”, “</style>\r\n”, $out0);
    $out2 = str_replace(“</title>”, “</title>\r\n”, $out1);
    $out3 = str_replace(“</script>”, “</script>\r\n”, $out2);
    $output = str_replace($out0, $out1, $out2, $out3);

    return $output;
    }

    Thread Starter cluster666

    (@cluster666)

    thank you, looks very good ??
    if I disable the HTML from backend I have to use that in /theme/functions.php right?

    ## edit ##
    the minified inline css do not line break at the end

    </style><title>123456</titke>

    any way to add a break only after </style>

    Ralph

    Thread Starter cluster666

    (@cluster666)

    yep, whitespace removal but HTML should be visable line by line currently the html optimizer shows a one line source …
    would it be possible?

    Thread Starter cluster666

    (@cluster666)

    could you please give me a sample w/ what I have to change to add breaks for HTML optimizing?
    I also need to keep the <![CDATA]]> tags in source.

    Regards
    Ralph

    Thread Starter cluster666

    (@cluster666)

    I guess there is something wrong by calling

    https://www.mydomain.tld/en/wp-admin/admin-ajax.php

    this is a multisite and base dir is /
    so it should not call /en/ or /fr/ parts in the URL
    could this be the reason?

    Thread Starter cluster666

    (@cluster666)

    wp-admin has been protected w/ htaccess so there is a additional rule inside htaccess:

    <Files admin-ajax.php>
    Order allow,deny
    Allow from all
    Satisfy any
    </Files>

    Thread Starter cluster666

    (@cluster666)

    thank you guys, should I change something here?

    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    Thread Starter cluster666

    (@cluster666)

    Hi James, now I have disabled all installed plugins in network settings and re-enabled each per site … the browser lang redirect was enabled to all network sites – seems page load is a little faster
    Pagespeed results shows images bellow 0.8 but it shows admin-ajax.php w/ about 1.5 – 2s, I’m using kk Star Ratings which call admin-ajax.php
    var bhittani_plugin_kksr_js = {"nonce":"d56ebe22d3","grs":true,"ajaxurl":"https:\/\/www.mydomain.tld\/wp-admin\/admin-ajax.php","func":"kksr_ajax"
    <script type="application/ld+json">{ "@context": "https://schema.org", "@type": "WebSite", "url": ...

    Thread Starter cluster666

    (@cluster666)

    thanks for reply, I’m using the autoptimize plugin without CDN …
    Multisite w/ 4 languages … sometimes it seems that WP is searching for images in uploads first …

    Thread Starter cluster666

    (@cluster666)

    yeah ??
    I missed to tell you that I use css inline option and the data.uris will placed into the same part … could this be the reason because it break something there?
    Ralph

    Thread Starter cluster666

    (@cluster666)

    20 errors less from 180, I tried w/ single quote too but it returns an error 500 …
    Do you think it has a bad effect for seo ranking w/ data-uri’s enabled because of jigsaw checks?

    Thread Starter cluster666

    (@cluster666)

    if I use data: URIs is there something I could change to make it compatible with https://jigsaw.w3.org/css-validator

    happy Holidays!

Viewing 15 replies - 31 through 45 (of 54 total)