Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7057693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:01:07+00:00 2026-05-28T04:01:07+00:00

Checking the simple code var http = require(‘http’); var server = http.createServer(function(req, res){ console.log(Got

  • 0

Checking the simple code

var http  = require('http');
var server = http.createServer(function(req, res){
    console.log("Got Request");
    res.end("");
});

When I am sending request to server using Firefox 8.0.1, I am geting console output once

Got Request

Using Chrome 16.0

Got Request
Got Request

why createServer is running 2 times on chrome??? is it a bug or something wrong with my code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:01:07+00:00Added an answer on May 28, 2026 at 4:01 am

    Browsers may submit addtional requests to the site, in which the most notable one is favicon.ico. Its purpose is to get the favicon for the site. And some plugins will also make additional requests. To make clear exactly what is being requested, you may print the url for the requests:

    var http  = require('http');
    var server = http.createServer(function(req, res){
        console.log(req.url); // <<<<<<<<<<<<<<<<<<<<<<<<<<<< print the requested url
        res.end("");
    });
    server.listen(8000)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here is a simple d/tango code in windows: module d_test.d; import tango.util.log.Trace; import tango.core.Thread;
I have a simple code checking if image url is valid. Unfortunately whether image
I'm working on a simple spell checking app for a lecture that I'm giving.
Is there a simple way of checking whether a given character is in a
Pretty simple question. I have a few ASP RequiredFieldValdators checking some text boxes. Out
I am trying to do some very simple form validation checking for null or
After checking out code for the first time from a repository into Eclipse using
I need a simple way of checking how much ram and fast the CPU
The code below is checking performance of three different ways to do same solution.
POST #1 How can I validate this simple form (checking for empty field strings)?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.