[Resolved] Error JavaScript MIME type, or module /

Home Forums Support [Resolved] Error JavaScript MIME type, or module /

Home Forums Support Error JavaScript MIME type, or module /

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1077377
    Lilia

    Dear GeneratePress Team,
    recently i got the following errors
    https://validator.w3.org/nu/?doc=https://www.eu-rights.com/

    “A script element with a src attribute must not have a type attribute whose value is anything other than the empty string, a JavaScript MIME type, or module.”

    <script type=”639d96b90d2f2cf2eac55d1e-text/javascript” defer src=’https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js’&gt;

    <script type=”639d96b90d2f2cf2eac55d1e-text/javascript” defer src=”https://www.eu-rights.com/wp-content/cache/autoptimize/js/autoptimize_85d7577838028ed016043e03a0c8bdef.js”&gt;

    Do you have any idea how I can straighten this error info?

    Thank you in advance for your efforts.
    lili

    #1077736
    David
    Staff
    Customer Support

    Hi there,

    did you fix this as i am not seeing the error in the Validator?

    #1077896
    Lilia

    Hy, Tom, Autoptimize brake allot of Code ;/

    for all autoptimize user !!

    for any Mobile Menu Problems!
    Exclude CSS from Autoptimize:

    wp-content/cache/, wp-content/uploads/, /wp-content/plugins/mobile-menu/, admin-bar.min.css, dashicons.min.css, /wp-includes/css/dist/block-library/editor.min.css

    Exclude scripts from Autoptimize:
    seal.js, js/jquery/jquery.js, wp-content/themes/generatepress/js/menu.min.js

    End you need!

    autoptimize filter !
    add_filter(‘autoptimize_html_after_minify’, function($content) {
    $site_url = ‘https://eu-rights.com&#8217;;
    $content = str_replace(“type=’text/javascript'”, ‘ ‘, $content);
    $content = str_replace(‘type=”text/javascript”‘, ‘ ‘, $content);

    $content = str_replace(“type=’text/css'”, ‘ ‘, $content);
    $content = str_replace(‘type=”text/css”‘, ‘ ‘, $content);

    $content = str_replace($site_url . ‘/wp-includes/js’, ‘/wp-includes/js’, $content);
    $content = str_replace($site_url . ‘/wp-content/cache/autoptimize’, ‘/wp-content/cache/autoptimize’, $content);
    $content = str_replace($site_url . ‘/wp-content/themes/’, ‘/wp-content/themes/’, $content);
    $content = str_replace($site_url . ‘/wp-content/uploads/’, ‘/wp-content/uploads/’, $content);
    $content = str_replace($site_url . ‘/wp-content/plugins/’, ‘/wp-content/plugins/’, $content);
    return $content; }, 10, 1);

    after this codes was everythink normaly !

    and now : Document checking completed. No errors or warnings to show. https://validator.w3.org/nu/?doc=https://www.eu-rights.com/

    for https://www.eu-rights.com/ and for https://www.betreuer24.com/

    After Generatpress update I was to fix the bugs with these codes ๐Ÿ™‚

    dear Tom many thanks for your massage

    #1078863
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Autoptimize should work pretty much out of the box with GP. Here’s a look at the options we use frequently: https://generatepress.com/fastest-wordpress-theme/

    Glad you got everything working on your end ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.