Jump to content

combining js files


Recommended Posts

Posted

when running speed and optimization tests one thing I see mentioned often is combining js files into one.
has anyone done that with IP Board and what are the pitfalls I should expect if I try it?

Posted

If you want, you can run the minify. save the output js and css to your computer. Then reupload that file as a static js/css files like minified.js into your template. Then load those js files instead of default ones. This method will support all cdns. But, will break the automatic changes. Alternatively, you can use a cdn that's compatible with minify.

Posted

i'll take a look at that.
there are only one or 2 places I have issues with minify too so it may be a theme setting I should check too before ruling out running it.

Posted

If you want, you can run the minify. save the output js and css to your computer. Then reupload that file as a static js/css files like minified.js into your template. Then load those js files instead of default ones. This method will support all cdns. But, will break the automatic changes. Alternatively, you can use a cdn that's compatible with minify.



that will not work, ipb presents js files as needed. No single page in IPB anywhere loads all of it, and apps add their own.
Posted

that will not work, ipb presents js files as needed. No single page in IPB anywhere loads all of it, and apps add their own.



Then, they can just add all the css/js into the minify query line and then save it. xD

----------------------

Or

Just switch to a cdn that actually supports queries... Which one are you using that it doesn't support it? I want to add it to my blacklist...
Posted

Then, they can just add all the css/js into the minify query line and then save it. xD



and install a new app? I'm just saying its not really feasible, in the end you would have to recompile that on every application uses a js module's install, and said single file would be massive.
Posted

and install a new app? I'm just saying its not really feasible, in the end you would have to recompile that on every application uses a js module's install, and said single file would be massive.



Indeed, it is a lot of manual labor if you switch around a lot.
I think a single large js/css file is the intent of this topic though.
Posted

Indeed, it is a lot of manual labor if you switch around a lot.


I think a single large js/css file is the intent of this topic though.



The way the js modules are written, when the document loads they init their events/handlers, as in this runs a rather HEAVY chance of conflicts and code looking for things that are not there, and latching onto selectors they are not meant to, or multiple js handlers attaching themselves to the same selectors, and barring all of that with perfectly written javascript, useless inits called on page load.
Content jquery manages this only because the init is always called from the block template.
Posted

don't have the specifics in front of me but some tests I had been running (different ones) all listed 4 or 5 to combine into one.
mostly (iirc) shadowbox (I use than not lightbox) and promenu.
nothing on the content pages, mostly forum index.
where I had never tried it just researching.
thinking on it though I may (initially at least) be better off implementing shadowbox in a different manner.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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