• Resolved vinjain

    (@vinjain)


    Hi All

    I have recently run a website test on Google Page Speed Test tool.. There were many Render-Blocking CSS files. I was able to fix all of them but there is one file which I am not able to fix. The reason is when I click on that file, it takes me to a error page. I do not even know if that file is important to me or just some spam. That css file is – https://www.ilampion.compath_to_style.css/?ver=4.5.3
    Hide details

    Can someone please look into this once and help me with it. I want to fix all the big or small errors because my website takes too much time to load.
    Also if you can provide me any suggestions or areas to improve the performance then I will really appreciate that.

    my website is – https://www.ilampion.com

    Best Regards
    Vineet

Viewing 15 replies - 1 through 15 (of 18 total)
  • Hello Vineet,
    Looks like you are trying to enqueue a CSS stylesheet improperly.
    Can you please share the content within your functions.php file?

    Thread Starter vinjain

    (@vinjain)

    Hi Walter

    Thanks for looking into this

    Below is the functions.php file of my website –

    [code moderated - follow the forum guidelines for posting code - https://codex.www.ads-software.com/Forum_Welcome#Posting_Code - and use the https://pastebin.com/%5D

    Hello Vinjain,
    I don’t see the issue here.
    Can you paste here the content of the ‘/inc/styles.php’ file please?
    Please make sure you use backticks when pasting code.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please DO NOT post giant chunks of code — use gist.github.com or wpbin.io and paste a link here. (Just sayin’)

    Thread Starter vinjain

    (@vinjain)

    apologies for pasting the code directly here…didn’t know about backticks option. But will ensure from now that it won’t happen again

    Thanks Steve & Walter

    Thread Starter vinjain

    (@vinjain)

    Walter – I have added the inc/styles.php file in gist.github as suggested by Steve.
    Please find that file here in this link below
    https://gist.github.com/anonymous/f4c2fb125fcf99cd59690b1bb0f30078

    Since I am using this github for the first time so I hope I’ve done everything right and you are able to see what you asked for

    Thread Starter vinjain

    (@vinjain)

    In Google page speed test online tool, my website scores are not bad..
    Mobile – 91/100 & Desktop – 97/100…..but still when anyone open our website, it takes too long to load or open on their device (desktop or mobile both).

    I did everything I could but seems like it only improves the score but doesn’t make any effect in latency or loading issue (which is the main point of concern for me)

    Any help would be really appreciated

    Thanks
    Vineet Jain

    Hello Vineet,
    From my end, your website load perfectly.
    What I’m trying to find is why you have this enqueue of CSS incorrectly:

    https://www.ilampion.compath_to_style.css/?ver=4.5.3

    Do you have installed a plugin to insert custom CSS?
    Do you use any caching plugin?

    Regards,

    If I had to guess, a sample wp_enqueue_style() function has been added somewhere. It would look something like:

    wp_enqueue_style( 'mystyle', 'path_to_style.css' );

    Can you try searching your theme files for

    wp_enqueue_style('mystyle

    or

    wp_enqueue_style( 'mystyle

    Thread Starter vinjain

    (@vinjain)

    Hello Walter

    Yes, I’ve installed a TJ Custom CSS Plugin to insert custom css.
    and also using W3 Total Cache Plugin

    Regards
    Vineet

    Hello vinjain,
    Try temporary deactivating TJ Custom CSS Plugin and clear W3 Total Cache Plugin cache and run a new test and let us know please.

    Thread Starter vinjain

    (@vinjain)

    Hi Walter

    I temporary deactivatdc TJ Custom CSS Plugin, cleared Cache via W3 Total Cache plugin…and after some time when i run the test..unfortunately it was just the same result

    kindly let me know what else I must do next in order to fix this error

    When you use the Chrome or Firefox code inspector, do you spot errors / conflicts with CSS and JS files ? (right click on page > inspect in chrome > then go to console tab – around same in Firefox).

    CSS rules can conflict sometimes, but i doubt it’s the real issue.

    Thread Starter vinjain

    (@vinjain)

    Hi Digico

    Here is what i get when I clicked on “Console Tab” in Inspect Chrome.

    Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    https://www.ilampion.compath_to_style.css/?ver=4.5.3

    JQMIGRATE: Migrate is installed, version 1.4.1
    autoptimize_6eb6ee0….js?050962:5

    and when I click on compath_to_style.css file link, it shows nothing inside. I took a snapshot of it and saved it in JPEG format but don’t see any option to share it in the post here..so I copy-paste the message here to share it with you.

    @vinjain, did you do the search I asked you to in my previous post. I’m sure that’s the issue, you just need to find the offending code.

    The file doesn’t exist, but a theme or plugin has tried to load ‘path_to_style.css’ because it’s left behind some tutorial or placeholder code.

    EDIT: A search for “path_to_style.css” on Google shows that the “ultimate hover effects” plugin has this issue:
    https://github.com/wp-plugins/ultimate-hover-effects/blob/master/ultimate-hover-effects.php#L49

    Are you running that plugin?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Render-blocking CSS’ is closed to new replies.