Jump to content

How many http requests for a php script?


kreut

Recommended Posts

Php is handled server side so http request are not and issue there.

It outputs 1 chunk that is sent to the browser.

 

If you want to find out how many http requests you make. Get an addon named YSlow for firefox or Chrome and run it.

It will even tell you what you should do to optimize.

as for performance have a read here: http://developer.yahoo.com/performance/rules.html

 

Link to comment
Share on other sites

It outputs 1 chunk that is sent to the browser.

 

It actually outputs one thing, but that can make multiple requests, such as: images, css, javascript, flash, audio, video, xml, etc.

 

Steps (I believe, correct me if I am wrong or missed something):

- Client goes to your website
- Browser makes request to the dns server
- The dns sever converts to ip
- the ip is found and it is considered an http request
- your web server (probably Apache) intercepts the request since it is listening on port 80
     - Apache uploads data (when using: <input type="file">) it is then put into a tmp folder
- When Apache loads the file requested, it checks for the file extension
- If there is a if there is something associated with that extension, and the plugin is installed Apache sends the request to the program to do the work
- The program (php in our case) takes the file and runs it through php doing what ever the php script tells it to do.
- When the script is complete html is sent back to Apache, and Apache then sends it back out to the web to the requesting client

Link to comment
Share on other sites

It outputs 1 chunk that is sent to the browser.

 

It actually outputs one thing, but that can make multiple requests, such as: images, css, javascript, flash, audio, video, xml, etc.

exactly....! 1 chunk (aka one thing)...... And to keep it on the subject PHP does not affect the amount of requests, it's that chunk it outputs that does.

Link to comment
Share on other sites

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.