• There are some problems if page cache plugins are used:

    Inline CSS for browser scrollbar width is hardcoded in output based on current browser user-agent in inc/dynamic-css/block-editor-compatibility.php at line 217:

    // Detect the operating system and set the typical scrollbar width.
    $user_agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '';
    $scrollbar_widths = [
    'Win' => '17px',
    'Mac' => '15px',
    'Linux' => '15px',
    ];

    $scrollbar_width = '0';
    foreach ( $scrollbar_widths as $platform => $width ) {
    if ( strpos( $user_agent, $platform ) !== false ) {
    $scrollbar_width = $width;
    break;
    }
    }

    $dynamic_css .= '
    :root {
    [...some lines removed...]
    --ast-scrollbar-width: ' . $scrollbar_width . ';
    }

    A wp_get_attachment_image_attributes filter changes src attribute of header image in output based on current browser user-agent in inc/markup-extras.php line 2036:

    if ( astra_check_is_ie() ) {
    // Replace header logo url to retina logo url.
    $attr['src'] = $retina_logo;
    }

    A get_custom_logo filter changes src attribute of header image in output based on current browser user-agent in inc/markup-extras.php line 290:

    if ( astra_check_is_ie() ) {
    // Replace header logo url to retina logo url.
    $attr['src'] = $retina_logo;
    }

    The above used function astra_check_is_ie() can be found inc/extras.php at line 301:

    /**
    * Function to check if it is Internet Explorer.
    *
    * @return true | false boolean
    */
    function astra_check_is_ie() {

    $is_ie = false;

    if ( ! empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
    $ua = htmlentities( sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ), ENT_QUOTES, 'UTF-8' ); // phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___SERVER__HTTP_USER_AGENT__ -- Need to check if its ie.
    if ( strpos( $ua, 'Trident/7.0' ) !== false ) {
    $is_ie = true;
    }
    }

    return apply_filters( 'astra_check_is_ie', $is_ie );
    }

    Astra 4.8.11

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @ov3rfly,

    Thank you for sharing this! I have forwarded this to our developers and they will have a look at it to optimize them accordingly. To stay updated on our progress, I recommend keeping an eye on our changelog page.

    Please do not hesitate to reach out if you have any further questions or concerns. We appreciate your cooperation while we work to resolve the problem.

    Kind regards,
    Aradhy 😊

    I can’t confirm the cause, but I can confirm I have had the same problem for a while now, which may coincide with when I added FastCGI caching. White borders on some pages of my website but not others, which can be fixed by modifying --ast-scrollbar-width from 17 px to 0px for the body element, both on desktop and phone. I know nothing about css however, so I’m afraid I can’t provide much more information.

    Hi @chocolatinfini,

    As per this forum guide, I would ask you to please start your own thread. You can cross-link it to this one, so we are aware of both.

    Kind regards,
    Aradhy 😊

    Thread Starter Ov3rfly

    (@ov3rfly)

    The above described issues with changed src attribute of header image in output based on current browser user-agent are not fixed yet and continue to cause problems with page cache plugins.

    Astra 4.8.12

    Hi @ov3rfly,

    The first issue has been resolved in the previous update, and our development team will review the remaining ones as well. We need more time to work on them as there are other priority tasks in progress.

    Kind regards,
    Aradhy 😊

    Thread Starter Ov3rfly

    (@ov3rfly)

    Not fixed yet with Astra 4.11.8.

    Hi @ov3rfly,

    Apologies for the delay. We’ve made a note of this and will review it internally. Given that Internet Explorer is officially unsupported and rarely used anymore, it’s likely this condition isn’t needed at all. We’ll look into whether it can be removed entirely or shifted to the client side to prevent cache-related issues.

    Thanks again for pointing this out — we really appreciate it.

    Kind regards,
    Aradhy 😊

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Not compatible with page cache’ is closed to new replies.