How can I use a different TCP protocol in HTML5? - html

We are doing some experiments in the lab and we have rewrite a TCP implementation. Now our problem is if there's some methods that can make HTML5 use our TCP stack to transmit videos.
Thanks.
Update:
Sorry about the description. I didn't know much about web technology, maybe my question shuold replace HTML5 by Browser.

Everything that is described in HTML is executed by the browser. HTML is not a programming language, it's markup. Therefore HTML has no influence on the internals of a browser.
Either you manage to get your browser to use a different TCP stack (which is unlikely unless you're working with Firefox or Chrome (or some other open source browser) and compile it from source), or you have to write your own browser.

Related

Replace WebBrowser control in VS2019 with Mozilla browser control (v1.7.12)

I have looked at numerous posts that discuss embedding the Mozilla browser control in a VB.NET app, however they were all written many years ago and are incomplete, like: How to create simple browser with Mozilla ActiveX Control with VB.NET?.
I was able to have a little success (display an HTML file with CSS3 and JavaScript) by embedding cefSharp into my VB.NET app, but cefSharp adds hundreds of MB. One of the posts said they believed that the Mozilla browser control (v1.7.12) was an exact replacement for the VS 2019 .Net web browser control, but there was no information on how to make the switch. Please advise if the Mozilla browser control is a good alternative, and if so, point to a tutorial or other information for making it work...or is there another choice?
You must use 3rd party library for this. You can use either GeckoFx for Firefox engine, or CefSharp for Chrome engine.

HTML Feature Detection and Universal React

We have a universal React application sitting behind a CDN.
We want to serve up HTML with srcset images from the server, but need to handle the fact that IE will not support this HTML feature, ideally using feature detection.
As the site is served from a CDN, IE will get the same initial HTML as other browsers. When the page loads in the browser, we want to swap out these srcset image tags for some different HTML, but this means React will complain about a mismatch between the client side HTML and the already rendered server side HTML.
What's the best way to handle this?
e.g.
ignore the warning, or specify it's ok somewhere?
use a client side polyfill that happens after the page has loaded e.g. using componentDidMount? In this case, how do we handle subsequent renders of an unchanged component not rewrite this HTML on the client?
use a cache key on the CDN for the user agent - but this would mean sniffing browser rather than using feature detection
The best and most compliant way is to leave both attributes. My guess is that browser will use "src" as a fallback but use "srcset" if available.
No polyfills or strange manipulations needed here :)

Avoid using the protocol on inline website elements?

Is it good to implement website elements like css, javascripts, images or web links without the protocol?
For example: jquery.com offer the cdn-file without:
//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
Pro for using is, that they automatically use the current protocol (http or https). Even the links are shorter (okay, just 4/5 signs). Are there any cons or should I use it on my own website?
Is there any definition about how browsers deal with this kind of links (official standard)?
href without protocol (Protocol-relative URL) is used to remove the naggy warning of accessing unsecure content in IE.
But it'll cause double download in IE7 and IE8 (alas, WHY U NO SMART!!!).
The standard RFC3986 is mentioned in Paul Irish's article. But standard can only serve as a reference in web development, the browser vendors' implementations is more important. Websites like Can I Use, WebPlatform documents this info.
Do refer to these links:
http://www.paulirish.com/2010/the-protocol-relative-url/
http://blog.httpwatch.com/2010/02/10/using-protocol-relative-urls-to-switch-between-http-and-https/
http://www.stevesouders.com/blog/2010/02/10/5a-missing-schema-double-download/

HTML5 serial port access?

Is there a way to have a HTML5 page access the serial port of a device, all client-side? I know this can be done with Java applet but I would like to know if it can be done with HTML5.
It cannot. Browsers do not allow access to the port without the use of a plugin.
google chrome has a javascript API to do that (http://developer.chrome.com/apps/serial.html)
but it is browser specific, no HTML5
No. And neither can JavaScript. You are mixing Java (applets) and JavaScript. They have nothing to do with eachother.

Is there a built-in HTML validator in any major browser? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
In Firefox, there's a Extension called “Html Validator”. It adds a little indicator icon at the bottom right corner of your window. When a page you visit isn't valid, it lights up. You can click on it to see the errors. The really important feature of this extension is that it does not make a connection to w3c's validator. The same validating SGML parser used by w3c is bundled. This means it can validate local HTML files. (This is most the important use for me, as I do web development with manually coded html files. Each time I preview my HTML in a browser, I can also know whether it has validation errors.)
Is there anything similar in Google Chrome, Opera, Safari, or even IE? When I looked in the past years, all other validator I've seen simply send the current url to w3c's validator site.
I am the author of the Firefox extension. I have recently rewritten it for Chrome and the new Webextension API of Firefox.
See more info on the extension homepage:
http://users.skynet.be/mgueury/mozilla/index.html
The direct link from the Google Chrome store is this:
https://chrome.google.com/webstore/detail/html-validator/mpbelhhnfhfjnaehkcnnaknldmnocglk
Enjoy,
There is a new HTML validator available for Chrome. It uses a JavaScript port of LibTidy and thus validates locally without the need of remote services.
See https://chrome.google.com/webstore/detail/anjdemaoejlpgmnmkijdemoiebcddhkc
The HTML Tidy Browser Extension works quite well, although it doesn't have as many features as the Firefox counterpart. As an added bonus, it works on localhost pages. You can get it here: https://chrome.google.com/webstore/detail/html-tidy-browser-extensi/gljdonhfjnfdklljmfaabfpjlonflfnm
HTML Validator by Robert Nyman for Google Chrome has an indicator icon, displays inline results, and validates local files.
I don't think that type of thing is usually built in, because they aren't needed by the average user and can slow down your browsing. Generally speaking, add-ons are the way to go, in my humble opinion.
The top two browser additions for anyone who is developing any website are: Firebug (as mentioned by a previous response) and the Web Developer toolbar, available for many browsers. Here is a link to the developer's page for the toolbar: Website for Web Developer Toolbar
Firebug is great for stepping through JavaScript, detecting errors, checking out your HTML & CSS, as well as a plethora of other useful features.
The Web Developer Toolbar on the other hand, allows you to Validate HTML, CSS, etc, either on a local host, or on the web, turn off Javascript, turn off CSS, plus much more!
I hope this helps!
I am using this plugin in Chrome:
https://github.com/renyard/validity
Simple enough to use.
But I think there will be better to have a native tool in Chrome / Firefox.