0

I am calling a JS file with a <script src=...> tag in the header. It's a rather large file.

The thing is, there is one function in the file that needs a query parameter, and I therefore must pass it to the file, making the file not really cachable.

Should I split this function out into its own JS file? This would allow the majority of my JS code to be cached, but the downside would be the browser client would need to establish a connection with two separate JS files instead of just one.

Thinking about performance here.

3
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by Dani
0

In today's world of high-speed Internet connections, I don't think this would be a problem. I say go for it and see if the performance really changes considerably.

0

That won't make any difference. Plus by taking advantage of caching you are improving site performance overall which is a good thing.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.