Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1486887

    Hi Enfold Team,

    We’re seeing a recurring issue across several WordPress websites built using the ENFOLD theme. All of these websites are hosted with SiteGround, and we’re using Enfold’s built-in JavaScript file merging and compression (via Enfold > Performance), not SiteGround’s SG Optimizer plugin for JS handling.

    The problem arises with the auto-generated avia-footer-scripts file in the /wp-content/uploads/dynamic_avia/ directory. Occasionally, this file appears to be served with the wrong MIME type (text/html instead of application/javascript), which causes the browser to block it and throw this error:

    Refused to execute script from ‘https://example.com/wp-content/uploads/dynamic_avia/avia-footer-scripts-xxxxx.js’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.

    When we visit the file directly, it displays a “Nothing found” page.

    Temporary Fix

    We’ve been resolving the issue manually with this process:
    1. Go to Enfold > Performance in the WordPress dashboard.
    2. Click “Delete old CSS and JS files”.
    3. Go to Enfold > Theme Options and click “Save all changes”.
    4. Clear browser cache and refresh the site.

    This regenerates the file with a new hash and correct MIME type, and the issue resolves.

    Our questions:
    • Do you know what might be causing this to happen across multiple Enfold-powered sites?
    • Is there anything we can do to prevent this from happening again in future?

    Thanks again for creating such an excellent theme and offering first-class support — we really appreciate your work.

    Many thanks in advance,

    Ben

    #1486907

    Hey Ben,

    Thank you for the inquiry.

    The theme generates the avia-footer-scripts and dynamic stylesheets, merge them if necessary based on the current theme settings and loads them using default WordPress functions like wp_enqueue_script or wp_enqueue_style. However, the MIME type and content headers are entirely handled by your server (Apache, NGINX, etc.) when serving those files, not by WordPress or the theme. This issue is likely related to your server configuration or possibly one of your plugins modifying headers. We recommend forwarding this thread to your hosting provider — they might be able to help identify what’s causing the incorrect MIME type.

    An alternative is to disable the default file compression and use the compression features provided by your cache plugin, if available. You can also install dedicated compression plugins such as Autoptimize or BWP.

    Let us know if you need more info.

    Best regards,
    Ismael

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