• Resolved 123photography

    (@123photography)


    Hi,

    I’m using the Autoptimize plugin, but I’m finding my stylesheet doesn’t load on first load of the website. I have to refresh it to get the CSS to load.

    Any ideas what I can do to fix this?

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    AO’s file 404’s, do you have a page cache to clear?

    Additionally; I see you’re also using “merge, minify, refresh” of which the CSS-file also 404’d and “Fast Velocity Minify”. Using more then one plugin to do asset optimization can cause serious issues, it is a lot safer to stick to just one.

    frank

    Thread Starter 123photography

    (@123photography)

    Hi,

    thanks for taking the tine to respond.

    I deleted the Merge, Minify, refresh plugin a few weeks ago, so not sure why it’s still showing that I’m using it?

    I’ve also deleted Fast Velocity Minify now.

    I’ve cleared the cache too…

    Are you still seeing these errors now?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    after a hard refresh (to make sure the browser isn’t showing a cached version of the page) the references to MMR & FVM indeed seem gone and the site does seem to load correctly now, so all seems well now ??

    Thread Starter 123photography

    (@123photography)

    It’s strange. It seems to be fixed when I load it in Google Chrome but in Firefox the CSS still doesn’t load on first try

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I’m a FF user and works for me, ctrl-f5 (hard refresh) or manually clearing cache should fix that.

    Thread Starter 123photography

    (@123photography)

    Hi,

    I still seem to be getting this issue of the CSS not loading first time on some browsers.

    When I do a webasite speed test on GTMEtrix the screen shot that loads is the page without the CSS loaded properly…

    https://gtmetrix.com/reports/www.123photography.co.uk/hFT8NP7h

    It’s very strange…

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Well, you have a page caching issue (the cached HTML points to already removed Autoptimized CSS), this test of https://www.123photography.co.uk/?bustthatcache=yesplease busts the page cache and no 404 issues there.

    Thread Starter 123photography

    (@123photography)

    thanks…so do you mean there website is fine? it’s just my computer and phone that are caching the site still?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    yes and no; the problem is not cache in your browser/ computer, but at server/ hoster/ plugin level depending on where page caching is done.

    Thread Starter 123photography

    (@123photography)

    I’m using Autoptimize and WP Super cache Plugins plus the site uses Cloudflare….

    I believe all these cache it? Any ideas how to solve this?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, clear WP Super Cache & Cloudflare maybe (AO does not do page caching) + check if your host also has page caching which needs to be purged?

    Thread Starter 123photography

    (@123photography)

    I’ve tried clearing the cache on WP Super Cache and Cloudflare, but I’m still finding the CSS does not load on first load…

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    test with https://www.123photography.co.uk/?bustthatcacheagain=yesplease, if it works that way it -still- is a page caching problem somewhere somehow I’m afraid.

    (all works for me, even with the cache-busting string)

    Thread Starter 123photography

    (@123photography)

    hi,

    yes it works for me with that link.

    See if you can re-create the error I’m getting:

    I’m getting the error when I use Firefox and when i do History, clear recent history, empty cache etc.

    Then I do a search for my website on google “123 photography” and click on the link from Google. The first time I view the site after doing that I’m getting the error.

    Every time after it’s fine…

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I can easily reproduce by loading your site in an anonymous/ private window, in which case I indeed see a link to an Autoptimized CSS file which does not exist. Based on the HTTP response headers (specifically: x-proxy-cache:hit header) there indeed is some page caching going on which is not Cloudflare of WP Super Cache, but which might be at host level:

    You will have to find where this proxy page caching is happening and clear that, this is not something I (or AO) can fix :-/

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘CSS not loading on first load of website’ is closed to new replies.