Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to change HTTP header info using javascript.

Posted on 2003-12-01
3
Medium Priority
?
5,813 Views
Last Modified: 2009-02-23
Is it possible to add or change the HTTP header info using javascript??

like  the header() function in PHP..whose description is as follows..

header ( string string [, bool replace [, int http_response_code]])

header() is used to send raw HTTP headers. See the HTTP/1.1 specification for more information on HTTP headers.

Or is it possible to make modifications like this using C or any other language.

My problem is i had got a CGI program written in C and when accessed should send a http response code..

Thanks in advance...

0
Comment
Question by:priya1234
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
wfRGB earned 500 total points
ID: 9862214
You can't turn a 200 response into a 404 with JS if thats what you are after.

Basic C is a fairly simple to learn so my sugestion is that you get yourself a good book on the subject (and read it)
so that you can rewrite the CGI program.
0
 
LVL 16

Expert Comment

by:jaysolomon
ID: 10393691
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: wfRGB {http:#9862214}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jAy
EE Cleanup Volunteer
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question