Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.