Jump to content

Recommended Posts

Posted

I am owner of the website (it's not a plugin/application).

In the past, I added my JS under theme folder and added it in includJs using {resource}

But I noticed, it caused 10+ additional requests when someone visits the website.

How do I package under my JS with invision resource to avoid extra network requests?

Posted

Every file you include on the page will initiate a network request. We do not recommend packaging custom Javascript into our own core Javascript. You're best off, if you have multiple Javascript files to include that are your own and being loaded from your server, just put them in as few files as you can and include them into the "Page Output" tab in ACP -> System -> Advanced Configuration, as needed.

Posted
3 minutes ago, Jim M said:

Every file you include on the page will initiate a network request. We do not recommend packaging custom Javascript into our own core Javascript. You're best off, if you have multiple Javascript files to include that are your own and being loaded from your server, just put them in as few files as you can and include them into the "Page Output" tab in ACP -> System -> Advanced Configuration, as needed.

There are multiple files (some are libraries with 1000s of line of code and some is custom code written internally).

Merging all of them in a single file manually is not ideal for me.

Is it possible to keep thems separate in dev environtment and merge them in a single file automatically in production?

Posted
5 minutes ago, VarunAgw said:

There are multiple files (some are libraries with 1000s of line of code and some is custom code written internally).

Merging all of them in a single file manually is not ideal for me.

Is it possible to keep thems separate in dev environtment and merge them in a single file automatically in production?

That would be up to you how you wish to handle this as it would not be handle via our software. 

Posted
22 minutes ago, Jim M said:

That would be up to you how you wish to handle this as it would not be handle via our software. 

Ok understood.

I just want to ensure I am not missing an existing feature and reinventing the wheel.

Posted

You arent. There is no built in feature to do this other than the area mentioned by my colleague. Other than that, creating an application for that purpose would be the other way to go

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...