WordPress.org

Forums

Original Background Image Shows Briefly On Refresh (12 posts)

  1. Rick5150
    Member
    Posted 2 years ago #

    I have a custom background image and lately when I refresh the page, the original background is there for a second before my custom image finally takes over. How can I prevent this from happening?

  2. Andrew
    Forum moderator
    Posted 2 years ago #

    Can you use PasteBin to hold your header.php file and send us the PasteBin'd link to that page?

  3. Andrew
    Forum moderator
    Posted 2 years ago #

  4. Rick5150
    Member
    Posted 2 years ago #

    Is this correct?

    http://pastebin.com/JArTSKfB

    I am not clear on the plugin... what does it do (in laymans terms?)

    Thank you for your quick response.

  5. Rick5150
    Member
    Posted 2 years ago #

    UPDATE: I have disabled my plugins and it appears to be the Jetpack installation that is causing this. Once I disable that one, all is fine. When I re-enable it, things go awry again.

  6. Andrew
    Forum moderator
    Posted 2 years ago #

    Did the footerscripts plugin improve the issue?
    What I think is happening:
    1. The stylesheet with the original background is loading first.
    2. JavaScript is loading afterwards.
    3. Then after that, the Custom CSS that has the correct background is loading.

    If you move JavaScript to the footer, steps 1 and 3 should happen seamlessly.

  7. Rick5150
    Member
    Posted 2 years ago #

    Thanks Andrew, that helps me understand.

    I had not tried it because I did not know what it did. I do not like loading too many plugins without understanding what they do as it means more potential to give me problems with each update.

    I will try it so we can add this as a possible solution as well, but I am not sure about the benefit of the Jetpack plugin as it seems more like a potential problem than anything else.

    I was using Jetpack to add custom CSS, but found a field in my site theme that does the same thing, so I do not need Jetpack and then problem went away.

  8. Rick5150
    Member
    Posted 2 years ago #

    NOPE. The footerscripts did not help. I enabled them first and everything was fine. Then I reactivated Jetpack and the problem was back. Jetpack is again disabled.

  9. Rick5150
    Member
    Posted 2 years ago #

    UPDATE: Just noticed that the Javascript to Footer plugin also brought my image slider to a screeching halt. Deleted it...

  10. Andrew
    Forum moderator
    Posted 2 years ago #

    When you disable Jetpack, does the background image you want disappear?

  11. Rick5150
    Member
    Posted 2 years ago #

    No. When I disabled Jetpack, the site loaded noticeably faster with no old background image "flicker" at all. You cannot even tell the original template background image is there.

    If you would like, I can enable Jatpack when you are available to see the site. Once you confirm, I will disable it so you can see the difference. Just let me know.

  12. Andrew
    Forum moderator
    Posted 2 years ago #

    If you really don't need Jetpack, then yes, you can remove it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.