• Resolved joycegrace

    (@joycegrace)


    Hello, will this plugin load its resources on every page of the site, regardless of whether a block is being used on that page?
    Or can it be selective, by automatically only loading a resource on a page that needs it?

    E.g. if I’m using the accordion on one page, will it load its scripts and styles, etc. on all pages, or just that one page?

    I know there are plugins to help with this. However, I would rather not have to manage this via a plugin. That can get messy very fast. And it’s hard to remember where resources were loaded, or unloaded, on a per-page basis.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @joycegrace! Thanks for your question.

    Atomic Blocks does load all block styles on every page load, regardless of whether there are any Atomic Blocks used on that page.

    Additionally, Atomic Blocks loads a Javascript file dismiss.js which handles dismissable notices from the Notice block. This is loaded on every page load.

    Lastly, there is another Javascript file to help with Newsletter Block functionality. This is only loaded if the Newsletter Block is on the page.

    This is obviously not ideal. I’ll pass it on to the team as a suggested improvement: To only load block scripts and styles when the block is registered.

    Thread Starter joycegrace

    (@joycegrace)

    Thank you so much. I would love to know if this is going to make it in the ‘to do list’ and when it can be implemented. This is a major reason why I would not use a plugin. For me personally.

    Luke Carbis

    (@lukecarbis)

    Hi @joycegrace. We’ve definitely added this to the backlog. I totally agree with your sentiment –?it would be a major roadblock for me too. I’ll do my best to prioritise this.

    Thread Starter joycegrace

    (@joycegrace)

    @lukecarbis THANK YOU so much. Love to know when I’m not the only ‘crazy’ one in the room obsessed about site load time ??
    How will we hear about an update? Should I close this thread? Or wait till it’s done to solve it?

    Luke Carbis

    (@lukecarbis)

    @joycegrace Keep your eye on the release notes for each update, if you can. Unfortunately, that’s really the only way we have of communicating this type of semi-technical change.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Load resources on every page?’ is closed to new replies.