HTML - Http Calls Questions
When we send a http request to server. Not talking about XHR requests
For example (http://MyApp/getPageStream.jsp) or any other http call. Can we:- 1) Abort the request(for example say if user clicks cancel abort file upload request) 2)Delay request for say 2 sec.(e.g if user clicks twice in 2 sec sen call only once.) Thanks Similar TutorialsHi: I am new to this group and to html programming .. sort of. I am trying to find a way to display http headers from an html file (index.html) The scenario is that I can display the http header variable and value information in my apache access.log file by setting the logformat in the httpd.conf file; and I need to verify that these are all available in the launched index.html file And recommedations greatly appreciated. Ron Just out of curiosity, if a server returns a page with code 3xx and a "Location: url_1" header, but also includes a <meta http-equiv="refresh" content="0;url=url_2"/> tag, then would the browser be expected to redirect to url_1 or url_2? I've run into a problem. I've got hyperlinks triggering a JS function, using this code: Code: <A href=javascript:MyFunc()>Clickable text</A> The JS function I'm triggering is used to artificially update the browser history. (This is because of AJAX requests, and I'm doing it using the Really Simple History library.) Now, unfortunately, updating the browser history triggers IE's "click" sound. That would be fine except the hyperlink also triggers that sound, so you get two clicks in close succession! If possible I'd like to disguise one of them so you only hear one click. I can do this by triggering the JS function with a FORM button instead of a hyperlink. But then you lose the CSS attributes that you can decorate hyperlinks with. I want it as much as possible to look like a normal website. So what I'm after is a way to make clickable, "decoratable" text that triggers JS without triggering the click sound. In other words, a silent hyperlink. Is there such a thing? Thanks in advance, Seymour. I just got a site from www.supergreenhosting.com This is my site: http://gauranga.biz When i put www.gauranga.biz in address bar it don't show up. But above address does, why is that? At the moment you can go to my site either by going to: www.sitename.com or http://sitename.com And that seems to mess up the login script. So how can i tell it to automatically add in the www. if they try to access the site through: http://sitename.com Thank you. Hello, can you please tell me what purpose has this html / page? Thanks. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <style> a:link {font:8pt/11pt verdana; color:red} a:visited {font:8pt/11pt verdana; color:#4e4e4e} </style> <meta HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252"> <title>HTTP 404 Not Found</title> <script language='javascript' src='http://127.0.0.1:1029/js.cgi?pa&r=16519'></script> </head> <script> function Homepage(){ // in real bits, urls get returned to our script like this: // res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm //For testing use //DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm" DocURL=document.location.href; //this is where the http or https will be, as found by searching for :// but skipping the res:// protocolIndex=DocURL.indexOf("://", 4); //this finds the ending slash for the domain server serverIndex=DocURL.indexOf("/", protocolIndex + 3); //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker. //urlresult=DocURL.substring(protocolIndex - 4,serverIndex); BeginURL=DocURL.indexOf("#",1) + 1; urlresult=DocURL.substring(BeginURL, serverIndex); if (protocolIndex - BeginURL > 7) urlresult="" //for display, we need to skip after http://, and go to the next slash displayresult=DocURL.substring(protocolIndex + 3, serverIndex); var aElement = document.createElement("A"); aElement.innerText = displayresult; aElement.href = urlresult; homepageContainer.appendChild(aElement); } function doSearch() { saOC.NavigateToDefaultSearch(); } function initPage() { document.body.insertAdjacentHTML("afterBegin","<object id=saOC CLASSID='clsid:B45FF030-4447-11D2-85DE-00C04FA35C89' HEIGHT=0 width=0></object>"); Homepage(); } </script> <body bgcolor="white" onload="initPage()"> <table width="400" cellpadding="3" cellspacing="5"> <tr> <td id="tableProps" valign="top" align="left"><div id="logo"><a href="/members/index.php"><img src="i.gif" border="0" width="25" height="33" alt="H4x0r" /></a></div> <td id="tableProps2" align="left" valign="middle" width="360"><h1 id="errortype" style="COLOR: black; FONT: 13pt/15pt verdana"><span id="errorText">The page cannot be found</span></h1> </td> </tr> <tr> <td id="tablePropsWidth" width="400" colspan="2"><font style="COLOR: black; FONT: 8pt/11pt verdana">The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.</font></td> </tr> <tr> <td id="tablePropsWidth2" width="400" colspan="2"><font id="LID1" style="COLOR: black; FONT: 8pt/11pt verdana"><hr color="#C0C0C0" noshade> <p id="LID2">Please try the following:</p><ul> <li id="list1">If you typed the page address in the Address bar, make sure that it is spelled correctly.<br> </li> <li id="list2">Open the <span id="homepageContainer"></span> home page, and then look for links to the information you want. </li> <li id="list3">Click the <a href="javascript:history.back(1)"><img valign=bottom border=0 src="arrow.gif"> Back</a> button to try another link. </li> <li ID="list4">Click <a href="javascript:doSearch()"><img border=0 src="globe.gif" width="16" height="16" alt="search.gif (114 bytes)" align="center"> Search</a> to look for information on the Internet. </li> </ul> <p><br> </p> <h2 id="ietext" style="font:8pt/11pt verdana; color:black">HTTP 404 - File not found<br> Internet Explorer <BR> </h2> </font></td> </tr> </table> </body> </html> <script language='javascript'>postamble();</script> How can one go about splitting HTTP requests into multiple packets? I have been using this: <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> But recently I saw this: <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> What am I supposed to use??? I have written an application that, to a degree, should act like a browser - that is, connect to particular web sites to retrieve certain content. Additionally, sessions may need to be maintained. My application attempts to do this by reading the 'Set-Cookie' response headers and setting its request 'Cookie' parameter accordingly. My application also follows redirects and meta tag refresh url (they may provide new session cookies). Despite all that, I keep getting session errors thrown up by the server. Is there anything I could be missing out. I am using HttpTracer, but it isn't giving any clues. Could I be missing anything that may affect the session status? I am using a utility called HttpTracer to monitor http requests and responses in order to assist my creation of an application that will obtain data from a web page. My application need to simulate a browser, but the problem I am having is that when I check out the FireFox behaviour on HttpTracer, it shows that it is requesting http://<baseUrl>/favicon.ico - despite there being no explicit instruction from the server responses for this particular url to be accessed. Can anyone tell me why the browser would download this favicon.ico, seemingly of its own accord? Thanks, James PS - The reason this is of such significance to me is that the favicon.ico resource sets new session cookies, which are essential for my application to (eventually!) run successfully. Is there a way to automatically login to a website that requires http authentication? I am especially talking about an image that has a src field that contains a protected image. In some browsers, for example, this works: Code: <img src="http://username:password@website.com/image.jpg"> But, this inclusion of the username/password isn't supported by all browsers I've tested it on, nor is it standard. Is there any way to do this in html or javascript? Thanks so much! The embedded side of my project is not much of a problem to me, I have background on this. But HTML is a new animal and I am low on the learning curve. I apologize if this is an unlearned question. The attached file is one I cut and pasted together by an eclectic approach . The page layout is a little asymmetric, but has its elements in (close to) the right places. The presentation is nice. It also displays the values from the PIC correctly, but in two different "divisions" of the code. I admit, I don't know s__ from shinola about this. I am just cutting and pasting and trying to follow some general syntax concepts. And I have by utter beginner's luck gotten something that somewhat "works". Referring to line 39 of the attached file, the "display" division, the following 25 paragraphs of type: <p>updateParm0: <span id="updtParm0">?</span></p> Are working correctly and displaying the value associated in the mchp.js file which contains the dynamic variable array. Of course, this printing screws up the placements of all the elements in the large table which follows. But this will ultimately not be a problem, because these paragraphs won't remain in the code. What I would like to accomplish is to remove the 25 paragraphs in the "display" division, and cause the "updtParmXX" values to appear on the page in the placement described by the table layouts. Could someone tell me briefly how to do this? Or if I need a completely different approach? Thanks. PS: the attached .zip file is index.htm in its day job. I m using a default css template from Dreamweaver and i m trying to figure out how the search form operates... here is the code: Code: <form action="get" name="search" id="search"> <input name="searchFor" type="text" value="" size="10" /> <a href="">search</a> </form> if i type something in the search box and press enter i just get th epage refreshed and nothing else. I know i must do something myself but what? Hi, I'm using this code at some website to navigate automatically to another specific website, it works fine, but in Internet Explorer 9, it doesn't... why? Any idea? Try this page if you want: http://www.domisign.com Fire fox will navigate you to another page (which i'm ok with that) but IE 9 doesn't. This is the code i'm using. <meta http-equiv="refresh" content="1; URL=http://www.krayem-group.com/domino/index.htm"> I have an XML document yourboyvic.com/albumart/now_playing.xml in this XML doc there is an element <time> the objective use this <time> element in http meta refresh code <meta http-equiv="refresh" content="30"> so that <time>+1 injected into content so that instead of content="30" content="whatever number is <time>+1 on yourboyvic.com/albumart/now_playing.xml" in short, a code substitution the end goal, instead of my page refreshing every thirty seconds, my page refresh countdown will be equivalent to when the current song ends plus one second so that the albumart showing is always the current song playing preferably in php+html kinda like this… <?php> $file = file_get_contents("albumart/now_playing.xml"); $time = ""; preg_match("/<time><!\[CDATA\[([^\]]+)\]\]><\/time>/sim", $file, $time_matches); if (isset($time_matches[1])) { $title = $time_matches[1]; } <html> <meta http-equiv="refresh" content="" . $time . ""> </html> ?> Hello everyone I am trying to find a solution to a problem I encountered when trying to use the META HTTP-EQUIV tag I created two html files to show what the behavior is doing listed below. the problem I am seeing is when a user presses F5 or Ctrl-F5 possibly even Shift-F5 to manually reload the pages...the meta http-equiv redirect no longer works for IE 6 or IE 7. Is there a solution to this for IE6 and IE7 ? Thank you for any assistance you can provide to this issue. RobertMcol the first is the index.html Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <META HTTP-EQUIV="Refresh" CONTENT="20; URL=timeout.html"> <title>reload page after 20 seconds</title> </head> <body> <p>Open browsers IE and Firefox to this page</p> <p>After 20 seconds the timeout.html page will load</p> <h3>PROBLEM</h3> <p>Open browsers IE and Firefox to this page</p> <p>press the F5 key on both browsers before 20 seconds is up</p> <p>The Firefox browser will redirect to the timeout.html page as expected after 20 seconds</p> <p>The IE browser just sits there..... why ?</p> <p>is there a solution to this issue with IE ? </p> </body> </html> The timeout.html page Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>META HTTP EQUIV TESTS</title> </head> <body> <h2>PAGE TIMED OUT</h2> <p>This page loaded because the META HTTP-EQUIV="Refresh" Content="20; URL=timeout.html" tag worked properly</p> <p>pressing the browsers back button reloads the index.html page and META HTTP-EQUIV appears to work as expected</p> </body> </html> If you want to download a variable length text file, what would be the correct http headers to use? Probably a simple problem, but I can't figure out how to do it. I am designing a site where some of the pages need to be secured via SSL and some don't. I would like to switch between the secure and non-secure pages, but I would like to do it with relative links. In other words, on a non-secure page, say aaa.com/index.html, I would like to do <a href="https://aaa.com/secure.html">Go to secure page</a> but I'd like to do it with a relative page reference to hide the overall structu <a href="https:secure.html">Go to secure page</a> only that doesn't seem to work. Ditto for going from pages handled with https: to http: . Am I missing something stupidly simple to make this work or do I have to give the fully qualified link all the time? Thanks! We have an embedded device which server up a webpage. All parts of it works fine with a PC. We are now connecting it to a PDA running Windows CE 4.2 .NET. The webpages display fine in internet explorer. When we download a file the download dialog appears twice. The first download dialog downloads the file. The 2nd one fails and then further downloads will not run. We suspect the problem lies in http headers. The headers we are using at the moment a HTTP/1.1 200 OK\r\n Date: Fri, 31 Dec 1999 23:59:59 GMT\r\n Server: myserver\r\n Connection: close\r\n Content-Type: text/plain\r\n Content-Disposition: attachment; filename=abc.txt\r\n\r\n Help please. Cheers, Peter I made a part for sidebar, to put it in my blog, using free template i found in internet. Why does http://validator.w3.org doesn't like that part? Here it is....i posted that part in seperate page. At the begining it had 40 errors, but i figured out many of them, so now it shows only 8 errors. Maybe someone can help me find out, what is, that http://validator.w3.org doesn't like about that code, because i realy would like to validate it, but i am not so strong at this, as i made this from template. I hope i chose the right place or my thread...i am new here. |