Jump to content

[SOLVED] Combine JS with php


justinede

Recommended Posts

Hey guys,

 

I have been trying to combine my js files into one using php. (reduces http requests)

I tried to follow this: http://www.ejeliot.com/blog/72

 

^^ That didnt work for me. It just wouldnt load my js.

So, I am coming to you guys for help. Anyone know an easy simple way I can combine my js files with php?

Link to comment
https://forums.phpfreaks.com/topic/170605-solved-combine-js-with-php/
Share on other sites

Well i'll tell you something. Even the biggest sites don't do that.

 

If you really want to combine your javascript files, Do a copy and paste  :facewall:

Course that won't work out well if you dont pay attention.

 

In addition look at this blog, it was written 2 3/4 years ago. It's more likely to be tailored to a larger dial up base of users then high speed internet.

 

Even if you combine the files... I mean the same amount of data is being downloaded to the client, give or take a kilobyte or two in bandwidth.

 

So why do you need this?

Yes, this is an old post. Note that combining the files just wasted internal resources, and your processor will have a double footprint per user. Most browsers slipstream your JS files per each requests, smaller separate files are in most cases faster for client loading purposes.

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.