Search completed in 0.89 seconds.
400 results for "urls":
Your results are loading. Please wait...
URLSearchParams - Web APIs
the urlsearchparams interface defines utility methods to work with the query string of a url.
... an object implementing urlsearchparams can directly be used in a for...of structure, for example the following two lines are equivalent: for (const [key, value] of mysearchparams) {} for (const [key, value] of mysearchparams.entries()) {} note: this feature is available in web workers.
... constructor urlsearchparams() returns a urlsearchparams object instance.
...And 15 more matches
URIs and URLs - Archive of obsolete content
nsiuri and nsiurl in a strict sense necko does only know urls, uris by the above definition are much too generic to be properly represented inside a library.
...nsiurl inherits from nsiuri and represents access to typical urls with schemes like "http", "ftp", ...
...nsstandardurl also contains the facilities to parse these typ of urls, to break the specification of the url "spec" down into the most basic segments.
...And 10 more matches
Data URLs - HTTP
data urls, urls prefixed with the data: scheme, allow content creators to embed small files inline in documents.
... note: data urls are treated as unique opaque origins by modern browsers, rather than inheriting the origin of the settings object responsible for the navigation.
... syntax data urls are composed of four parts: a prefix (data:), a mime type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data> the mediatype is a mime type string, such as 'image/jpeg' for a jpeg image file.
...And 8 more matches
RTCIceServers.urls - Web APIs
WebAPIRTCIceServerurls
the rtciceserver dictionary's urls property specifies the url or urls of the servers to be used for ice negotiations.
... syntax var iceserver = { urls = iceserverurl | [ url1, ..., urln ], username: "webrtc", // optional credential: "turnpassword" // optional }; iceservers.push(iceserver); the value of this property may be specified as a single url or as an array of multiple urls.
... mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "stun:stunserver.example.org" } ] }); notice that only the urls property is provided; the stun server doesn't require authentication, so this is all that's needed.
...And 6 more matches
URLs - Plugins
« previousnext » this chapter describes retrieving urls and displaying them on specified target pages, posting data to an http server, uploading files to an ftp server, and sending mail.
...plug-ins can request and receive the data associated with urls of any type that the browser can handle, including http, ftp, news, mailto, and gopher.
... the table below summarizes urls supported by gecko.
...And 5 more matches
Choosing between www and non-www URLs - HTTP
a recurring question among website owners is whether to choose non-www or www urls.
...this includes always linking to the chosen domain (which shouldn't be hard if you're using relative urls in your website) and always sharing links (by email/social networks, etc.) to the same domain.
... techniques for canonical urls there are different ways to choose which website is canonical.
...And 4 more matches
URLSearchParams() - Web APIs
the urlsearchparams() constructor creates and returns a new urlsearchparams object.
... syntax var urlsearchparams = new urlsearchparams(init); parameters init optional one of: a usvstring, which will be parsed from application/x-www-form-urlencoded format.
... return value a urlsearchparams object instance.
...And 2 more matches
URLSearchParams.toString() - Web APIs
the tostring() method of the urlsearchparams interface returns a query string suitable for use in a url.
... syntax urlsearchparams.tostring() parameters none.
...(returns an empty string if no search parameters have been set.) examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); //add a second foo parameter.
... params.append('foo', 4); console.log(params.tostring()); //prints 'foo=1&bar=2&foo=4' // note: params can also be directly created let url = new url('https://example.com?foo=1&bar=2'); let params = url.searchparams; // or even simpler let params = new urlsearchparams('foo=1&bar=2'); specifications specification status comment urlthe definition of 'tostring() (see "stringifier")' in that specification.
Resource URLs - HTTP
resource urls, urls prefixed with the resource: scheme, are used by firefox and firefox browser extensions to load resources internally, but some of the information is available to sites the browser connects to as well.
... syntax resource urls are composed of two parts: a prefix (resource:), and a url pointing to the resource you want to load: resource://<url> an example: resource://gre/res/svg.css when arrows are found in the resource url's ('->'), it means that the first file loaded the next one: resource://<file-loader> -> <file-loaded> please refer to identifying resources on the web for more general details.
... threats because some of the information shared by resource: urls is available to websites, a web page could run internal scripts and inspect internal resources of firefox, including the default preferences, which could be a serious security and privacy issue.
... note: it is recommended that web and extension developers don’t try to use resource urls anymore.
URLSearchParams.append() - Web APIs
the append() method of the urlsearchparams interface appends a specified key/value pair as a new search parameter.
... syntax urlsearchparams.append(name, value) parameters name the name of the parameter to append.
... examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); //add a second foo parameter.
URLSearchParams.delete() - Web APIs
the delete() method of the urlsearchparams interface deletes the given search parameter and all its associated values, from the list of all search parameters.
... syntax urlsearchparams.delete(name) parameters name the name of the parameter to be deleted.
... return value void examples let url = new url('https://example.com?foo=1&bar=2&foo=3'); let params = new urlsearchparams(url.search.slice(1)); // delete the foo parameter.
URLSearchParams.get() - Web APIs
the get() method of the urlsearchparams interface returns the first value associated to the given search parameter.
... syntax urlsearchparams.get(name) parameters name the name of the parameter to return.
... examples if the url of your page is https://example.com/?name=jonathan&age=18 you could parse out the 'name' and 'age' parameters using: let params = new urlsearchparams(document.location.search.substring(1)); let name = params.get("name"); // is the string "jonathan" let age = parseint(params.get("age"), 10); // is the number 18 requesting a parameter that isn't present in the query string will return null: let address = params.get("address"); // null specifications specification status comment urlthe definition of 'get()' in that specification.
URLSearchParams.getAll() - Web APIs
the getall() method of the urlsearchparams interface returns all the values associated with a given search parameter as an array.
... syntax urlsearchparams.getall(name) parameters name the name of the parameter to return.
... examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); //add a second foo parameter.
URLSearchParams.has() - Web APIs
the has() method of the urlsearchparams interface returns a boolean that indicates whether a parameter with the specified name exists.
... syntax var hasname = urlsearchparams.has(name) parameters name the name of the parameter to find.
... examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); params.has('bar') === true; //true specifications specification status comment urlthe definition of 'has()' in that specification.
URLSearchParams.set() - Web APIs
the set() method of the urlsearchparams interface sets the value associated with a given search parameter to the given value.
... syntax urlsearchparams.set(name, value) parameters name the name of the parameter to set.
... examples let's start with a simple example: let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); //add a third parameter.
URLSearchParams.entries() - Web APIs
the entries() method of the urlsearchparams interface returns an iterator allowing iteration through all key/value pairs contained in this object.
... examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the key/value pairs for(var pair of searchparams.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment urlthe definition of 'entries() (see "iterable")' in that specification.
URLSearchParams.forEach() - Web APIs
the foreach() method of the urlsearchparams interface allows iteration through all values contained in this object via a callback function.
... examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // log the values searchparams.foreach(function(value, key) { console.log(value, key); }); the result is: value1 key1 value2 key2 specifications specification status comment urlthe definition of 'foreach() (see "iterable")' in that specification.
URLSearchParams.keys() - Web APIs
the keys() method of the urlsearchparams interface returns an iterator allowing iteration through all keys contained in this object.
... examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the keys for(var key of searchparams.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment urlthe definition of 'keys() (see "iterable")' in that specification.
URLSearchParams.sort() - Web APIs
the urlsearchparams.sort() method sorts all key/value pairs contained in this object in place and returns undefined.
... examples // create a test urlsearchparams object var searchparams = new urlsearchparams("c=4&a=2&b=3&a=1"); // sort the key/value pairs searchparams.sort(); // display the sorted query string console.log(searchparams.tostring()); the result is: a=2&a=1&b=3&c=4 specifications specification status comment urlthe definition of 'sort()' in that specification.
URLSearchParams.values() - Web APIs
the values() method of the urlsearchparams interface returns an iterator allowing iteration through all values contained in this object.
... examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the values for(var value of searchparams.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment urlthe definition of 'values() (see "iterable")' in that specification.
browser.urlbar.trimURLs
the preference browser.urlbar.trimurls controls whether the protocol http and the trailing slash behind domain name (if the open page is exactly the domain name) are hidden.
Index - Web APIs
WebAPIIndex
504 cache.addall() api, cache, experimental, method, needsexample, reference, service workers, service worker api, serviceworker, addall the addall() method of the cache interface takes an array of urls, retrieves them, and adds the resulting response objects to the given cache.
... 1562 recommended drag types guide, drag and drop the html drag and drop api supports dragging various types of data, including plain text, urls, html code, files, etc.
...these utilities allow to deal with common features like urls.
...And 21 more matches
Creating regular expressions for a microsummary generator - Archive of obsolete content
microsummary generators use them to identify the pages that the generators know how to summarize by matching patterns in those pages' urls.
... in this tutorial, we'll explain how to make regular expressions that match the urls for ebay auction item pages.
... by the end of the tutorial, you should know some basics about regular expressions and understand how to create expressions that match urls.
...And 16 more matches
What is a URL? - Learn web development
this article discusses uniform resource locators (urls), explaining what they are and how they're structured.
... deeper dive basics: anatomy of a url here are some examples of urls: https://developer.mozilla.org https://developer.mozilla.org/docs/learn/ https://developer.mozilla.org/search?q=url any of those urls can be typed into your browser's address bar to tell it to load the associated page (resource).
... note: there are some extra parts and some extra rules regarding urls, but they are not relevant for regular users or web developers.
...And 14 more matches
HTTP Index - HTTP
WebHTTPIndex
5 choosing between www and non-www urls guide, http, url a recurring question among website owners is whether to choose non-www or www urls.
... 6 data urls base64, guide, http, intermediate, url data urls, urls prefixed with the data: scheme, allow content creators to embed small files inline in documents.
... 11 resource urls guide, http, intermediate, resource resource urls, urls prefixed with the resource: scheme, are used by firefox and firefox browser extensions to load resources internally, but some of the information is available to sites the browser connects to as well.
...And 10 more matches
Finishing the Component
when the component starts up, it populates a list of urls read in from a file stored next to the gecko binary on the local system.
...the interfaces needed to block certain urls from loading are not frozen, and there is still some debate about how exactly this functionality should be exposed to embedders and component developers, so the apis are not ready to be published.
... the web locking policy that we are going to put into place is quite simple: for every load request that comes through, we will ensure that the uri is in the list of "good" urls on the white list.
...And 9 more matches
nsIFileProtocolHandler
inherits from: nsiprotocolhandler last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview nsifile getfilefromurlspec(in autf8string url); autf8string geturlspecfromactualfile(in nsifile file); autf8string geturlspecfromdir(in nsifile file); autf8string geturlspecfromfile(in nsifile file); nsiuri newfileuri(in nsifile afile); nsiuri readurlfile(in nsifile file); methods getfilefromurlspec() converts the url string into the corresponding nsifile if possible.
...nsifile getfilefromurlspec( in autf8string url ); parameters url the url string to convert.
...geturlspecfromactualfile() converts the nsifile to the corresponding url string.
...And 8 more matches
Creating hyperlinks - Learn web development
a quick primer on urls and paths to fully understand link targets, you need to understand urls and file paths.
... urls use paths to find files.
...— so the url you would use is ../pdfs/project-brief.pdf: <p>a link to my <a href="../pdfs/project-brief.pdf">project brief</a>.</p> note: you can combine multiple instances of these features into complex urls, if needed, for example: ../../../complex/path/to/my/file.html.
...And 6 more matches
Starting WebLock
when weblock is called, one of the first things it wants to do is read in a file that lists the urls that the browser is allowed to load.
...for example, to expose the location of the "white list" file containing all of the urls that are safe for weblock, you can add its location to the nsdirectoryservice, which clients can then query for this infomation.
...a linear search through the data in the white list may not be terribly bad if the number of urls is under a couple of dozen, but it decays as the list grows.
...And 6 more matches
page-mod - Archive of obsolete content
exclude has the same syntax as include, but specifies the urls to which content scripts should not be attached, even if they match include: so it's a way of excluding a subset of the urls that include specifies.
... private windows if your add-on has not opted into private browsing, then your page-mods will not attach content scripts to documents loaded into private windows, even if their urls match the pattern you have specified.
...gemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://www.iana.org/domains/example/", contentscript: 'window.alert("page matches ruleset");' }); you can specify a number of wildcard forms, for example: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscript: 'window.alert("matched!");' }); you can specify a set of urls using a regular expression.
...And 5 more matches
panel - Archive of obsolete content
the urls are usually constructed using self.data.url().
... contentscriptfile string,array a url or an array of urls.
... the urls point to scripts to load into the panel.
...And 5 more matches
util/match-pattern - Archive of obsolete content
test strings containing urls against simple patterns.
... example pattern example matching urls example non-matching urls "http://example.com/" http://example.com/ http://example.com http://example.com/foo https://example.com/ http://foo.example.com/ wildcards a single asterisk matches any url with an http, https, or ftp scheme.
... example pattern example matching urls example non-matching urls "*" http://example.com/ https://example.com/ ftp://example.com/ http://bar.com/foo.js http://foo.com/ file://example.js resource://me/my-addon/data/file.html data:text/html,hi there a domain name prefixed with an asterisk and dot matches any url of that domain or a subdomain, using any of http, https, ftp.
...And 5 more matches
Necko Architecture
architecture after a few iterations of our original design, the current necko architecture looks something like this: urls necko's primary responsibility is moving data from one location, to another location.
...urls provide getting/setting of paths, hosts, ports, filenames, etc.
... urls are the most commonly used form of a uri.
...And 5 more matches
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
in simple terms, this means urlscheme://restofurl.
... see validation for details on how urls are validated to ensure that they're formatted properly.
...by adding the required attribute, only properly-formed urls are allowed; the input is no longer considered valid when empty.
...And 5 more matches
context-menu - Archive of obsolete content
urlcontext(matchpattern) this context occurs when the menu is invoked on pages with particular urls.
...in your own add-on, you will probably want to create your content scripts in separate files and pass their urls using the contentscriptfile property.
... contentscriptfile string,array if the item is contained in the top-level context menu, this is the local file url of the content script or an array of such urls that the item can use to interact with the page.
...And 4 more matches
Index - Archive of obsolete content
64 url add-on sdk construct, validate, and parse urls.
... 128 util/match-pattern test strings containing urls against simple patterns.
... 226 custom about: urls about: this page describes how to register a new about: url for your extension.
...And 4 more matches
The Chrome URL - Archive of obsolete content
however, packages that are installed into mozilla's chrome system can be referenced with special chrome urls.
...the chrome urls are independent of where the files might physically be located.
...the mapping between chrome urls and jar files are specified in the manifest files stored in the chrome directory.
...And 4 more matches
WebRequest.jsm
filter is an object that may contain up to two properties: urls and types.
... name type description urls matchpattern only invoke the listener for urls that match one of the patterns.
... examples basic examples this example just logs the url for every request initiated: let {webrequest} = cu.import("resource://gre/modules/webrequest.jsm", {}); webrequest.onbeforerequest.addlistener(logurl); function logurl(e) { console.log("loading: " + e.url); } filtering this example logs urls for requests under "https://developer.mozilla.org/": let {webrequest} = cu.import("resource://gre/modules/webrequest.jsm", {}); cu.import("resource://gre/modules/matchpattern.jsm"); let pattern = new matchpattern("https:/developer.mozilla.org/*"); webrequest.onbeforerequest.addlistener(logurl, {urls: pattern}); function logurl(e) { console.log("loading: " + e.url); } this listener will be...
...And 4 more matches
Add to iPhoto
it differs from a string in that it offers url-specific methods for managing the content, and includes methods for converting between urls and file system routine data formats such as fsref and unix pathnames.
... the function we'll be using is lsopenurlswithrole(), whose declaration looks like this: this.lsopenurlswithrole = this.lib.declare("lsopenurlswithrole", ctypes.default_abi, // abi type osstatus, // returns osstatus corefoundation.cfarrayref, // array of files to open in the app ...
...ithstring(null, appstrcf, null); corefoundation.cfrelease(appstrcf); var b = corefoundation.cfurlgetfsref(appurl, ref.address()); if (!b) { var stringsbundle = document.getelementbyid("string-bundle"); alert(stringsbundle.getstring('alert_download_error_string')); } else { var array = ctypes.cast(mutablearray, corefoundation.cfarrayref); appservices.lsopenurlswithrole(array, 0, null, appparams.address(), null, 0); } corefoundation.cfrelease(appurl); // clean up corefoundation.cfrelease(array); } appservices.shutdown(); carbon.shutdown(); corefoundation.shutdown(); } this code begins by initializing all the system frameworks we're using, by calling the init() methods on the corefoundation, carbon, and appservices objects.
...And 4 more matches
Index - HTTP
WebHTTPHeadersIndex
29 csp: base-uri csp, directive, document directive, http, security the http content-security-policy base-uri directive restricts the urls which can be used in a document's <base> element.
... 32 csp: connect-src csp, directive, http, reference, security the http content-security-policy (csp) connect-src directive restricts the urls which can be loaded using script interfaces.
... 35 csp: form-action csp, directive, http, security the http content-security-policy (csp) form-action directive restricts the urls which can be used as the target of a form submissions from a given context.
...And 4 more matches
Gecko Compatibility Handbook - Archive of obsolete content
change relative urls from http://directory/...
...or use absolute paths in urls such as http://example.com/directory/...
... incorrect relative urls a relative url is one which refers to the same web server where a web page is hosted.
...And 3 more matches
Recommended Drag Types - Web APIs
the html drag and drop api supports dragging various types of data, including plain text, urls, html code, files, etc.
...lines that begin with a number sign (#) are comments, and should not be considered urls.
... the text/plain fallback for multiple links should include all urls, but no comments.
...And 3 more matches
RTCIceServer - Web APIs
urls this required property is either a single domstring or an array of domstrings, each specifying a url which can be used to connect to the server.
... avoid specifying an unnecessarily large number of urls in the urls property; the startup time for your connection will go up substantially.
... older versions of the webrtc specification included an url property instead of urls; this was changed in order to let you specify multiple addresses for each server in the list, as shown in the example below.
...And 3 more matches
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
notes: download only works for same-origin urls, or the blob: and data: schemes.
...links are not restricted to http-based urls — they can use any url scheme supported by browsers: sections of a page with fragment urls pieces of media files with media fragments telephone numbers with tel: urls email addresses with mailto: urls while web browsers may not support other url schemes, web sites can with registerprotocolhandler() hreflang hints at the human language of the linked url.
... ping a space-separated list of urls.
...And 3 more matches
Content-Security-Policy - HTTP
connect-src restricts the urls which can be loaded using script interfaces default-src serves as a fallback for the other fetch directives.
... base-uri restricts the urls which can be used in a document's <base> element.
... form-action restricts the urls which can be used as the target of a form submissions from a given context.
...And 3 more matches
Microsummary XML grammar reference - Archive of obsolete content
child elements: <include> (optional) a regular expression matching the urls of pages that the generator is able to summarize.
... <exclude> (optional) a regular expression matching the urls of pages that the generator is not able to summarize.
...the following example identifies a generator as being able to summarize all pages on the www.example.com web site except pages named about.html: <pages> <include> ^http://www\.example\.com/ </include> <exclude>/about\.html</exclude> </pages> note: regular expressions intended to match the beginnings of page urls should start with the caret (^) to ensure they do not inadvertently match urls which merely contain the urls they intend to match.
...And 2 more matches
Command line crash course - Learn web development
o, along with names of relevant tools in each case: navigate your computer’s file system along with base level tasks such as create, copy, rename and delete: move around your directory structure: cd create directories: mkdir create files (and modify their metadata): touch copy files: cp move files: mv delete files or directories: rm download files found at specific urls: curl search for fragments of text inside larger bodies of text: grep view a file's contents page by page: less, cat manipulate and transform streams of text (for example changing all the instances of <div>s in an html file to <article>): awk, tr, sed note: there are a number of good tutorials on the web that go much deeper into the command line on the web — this is only a brief introduct...
...this is exactly the same as you would see with urls in your web browser.
...we will first try to fetch the contents of mdn's "fetch" page using the curl command (which can be used to request content from urls), from /docs/web/api/fetch.
...And 2 more matches
Creating localizable web applications
use the locale code in the urls depending on how you detect user's locale, you may want to provide a way of overriding the autodetection.
...the latter involves rewriting the urls to include the locale code and rewriting apache's aliases to handle locale in urls.
... separate urls from navigation sometimes, when the urls are well-designed, you may want to use the url to do something in the code depending on where the user is.
...And 2 more matches
Places utilities for JavaScript
array object getannotationsforuri(nsiuri auri); array object getannotationsforitem(int aitemid); void setannotationsforuri(nsiuri auri, object aannos); void setannotationsforuri(int aitemid, object aannos); getviewfornode(nsidomnode anode); void markpageastyped(string aurl); void markpageasfollowedbookmark(string aurl); boolean checkurlsecurity(nsinavhistoryresultnode aurinode); string getquerystringforfolder(int afolderid); string getdescriptionfromdocument(nsidomdocument doc); string setpostdataforbookmark(int aboomarkid, string apostdata); string getpostdataforbookmark(int aboomarkid); array string geturlandpostdataforkeyword(string akeyword); string getitemdescription(int ...
...aitemid); nsinavhistoryresultnode getmostrecentbookmarkforuri(nsiuri auri); nsinavhistoryresultnode getmostrecentfolderforfeeduri(nsiuri auri); nsinavhistoryresultnode geturlsforcontainernode(nsinavhistoryresultnode anode); void opencontainernodeintabs(nsinavhistoryresultnode anode, nsidomevent aevent); void openurinodesintabs(array nsinavhistoryresultnode anodes, nsidomevent aevent); void createmenuitemfornode(nsinavhistoryresultnode anode, acontainersmap); constants mimetypes type_x_moz_place_container type_x_moz_place_separator: "text/x-moz-place-separator", type_x_moz_place: "text/x-moz-place", type_x_moz_url: "text/x-moz-url", type_html: "text/html", type_unicode: "text/unicode", services there's easy access to some ...
... markpageasfollowedbookmark(string aurl) checkurlsecurity() allows opening of javascript/data uri only if the given node is bookmarked (see bug 224521).
...And 2 more matches
nsIFaviconService
this function is intended for automatic usage, and will only save favicons for "good" urls, as defined by what gets added to history.
... for "bad" urls, this function will succeed and do nothing.
...this function will not save favicons for non-bookmarked urls when history is disabled (expiration time is 0 days).
...And 2 more matches
URL API - Web APIs
WebAPIURL API
the url api is a component of the url standard, which defines what constitutes a valid uniform resource locator and the api that accesses and manipulates urls.
...you can also look up the values of individual parameters with the urlsearchparams object's get() method: let addr = new url("https://mysite.com/login?user=someguy&page=news"); try { loginuser(addr.searchparams.get("user")); gotopage(addr.searchparams.get("page")); } catch(err) { showerrormessage(err); } for example, in the above snippet, the username and target page are taken from the query and passed to appropriate functions that are used by the site's cod...
... other functions within urlsearchparams let you change the value of keys, add and delete keys and their values, and even sort the list of parameters.
...And 2 more matches
<base>: The Document Base URL element - HTML: Hypertext Markup Language
WebHTMLElementbase
the html <base> element specifies the base url to use for all relative urls in a document.
... if either of the following attributes are specified, this element must come before other elements with attribute values of urls, such as <link>’s href attribute.
... href the base url to be used throughout the document for relative urls.
...And 2 more matches
Redirections in HTTP - HTTP
redirects accomplish numerous goals: temporary redirects during site maintenance or downtime permanent redirects to preserve existing links/bookmarks after changing the site's urls, progress pages when uploading a file, etc.
... keeping links alive when you restructure web sites, urls change.
... even if you update your site's links to match the new urls, you have no control over the urls used by external resources.
...And 2 more matches
Modules - Archive of obsolete content
the module system used by the sdk is based on the commonjs specification: it is implemented using a loader object, which handles all the bookkeeping related to module loading, such as resolving and caching urls.
...for instance, it does not know how to handle relative urls, which is cumbersome if you want to organize your project hierarchically.
...the require function has some extra features not provided by loadscript: it solves the problem of resolving relative urls (which we have left unresolved), and provides a caching mechanism, so that when the same module is loaded twice, it returns the cached module object rather than triggering another download.
...for instance, the option paths is used to specify a list of paths to be used by the loader to resolve relative urls: let loader = loader({ paths: ["./": "http://www.foo.com/"] }); commonjs also defines the notion of a main module.
page-worker - Archive of obsolete content
in your own add-ons, you will probably want to create your content scripts in separate files and pass their urls using the contentscriptfile property.
... contentscriptfile string,array a local file url or an array of local file urls of content scripts to load.
... include a set of match patterns to define the urls which the page-worker's content script will be applied.
... contentscriptfile a local file url or an array of local file urls of content scripts to load.
widget - Archive of obsolete content
in your own add-ons, you will probably want to create your content scripts in separate files and pass their urls using the contentscriptfile property.
... contentscriptfile string,array a local file url or an array of local file urls of content scripts to load.
... contentscriptfile a local file url or an array of local file urls of content scripts to load.
... contentscriptfile a local file url or an array of local file urls of content scripts to load.
Manifest Files - Archive of obsolete content
packages may be installed into mozilla and referenced with chrome urls.
...the file paths for the branding and browser packages use jar urls as the content is packaged up into an archive.
...the chrome urls that these would map to would be chrome://browser/skin and chrome://browser/locale.
... on windows, file urls are of the form file:///c:/files/app/, where c is the drive letter.
XUL Structure - Archive of obsolete content
firefox and thunderbird, as well as number of other components are all written in xul and are all accessible via chrome urls.
...it is important to note that when accessing content through a chrome url, it gains the enhanced privileges described above that other kinds of urls do not.
... chrome urls may be used to access installed packages and open them with enhanced privileges.
...in addition, the package might include several different applications, each accessible via different chrome urls.
URL - MDN Web Docs Glossary: Definitions of Web-related terms
in the context of http, urls are called "web address" or "link".
... your browser displays urls in its address bar, for example: https://developer.mozilla.org some browsers display only the part of a url after the "//", that is, the domain name.
... urls can also be used for file transfer (ftp) , emails (smtp), and other applications.
... learn more general knowledge url on wikipedia learn about it understanding urls and their structure specification the syntax of urls is defined in the url living standard.
Firefox and the "about" protocol
available about: urls depend on your specific firefox version.
... here is a complete list of urls in the about: pseudo protocol: about: page description about:about provides an overview of all about: pages available for your current firefox version about:addons add-ons manager about:buildconfig displays the configuration and platform used to build firefox about:cache displays information about the memory, disk, and appcache about:checkerboard switches to the checkerboarding measurement page, which allows to detect checkerboarding issues about:config provides a way to inspect and change firefox preferences and settings about:compat lists overriding site compatability fixes, linked to specific bug issues.
...unning (in case the user enabled telemetry) about:url-classifier displays the status of the url classifier services that firefox uses (for example for safe browsing) about:webrtc information about webrtc usage about:welcome page first displayed when firefox is installed about:welcomeback information page displayed after firefox is reset these urls are defined in docshell/base/nsaboutredirector.cpp within the kredirmap array.
... the array maps most of the urls, like config to urls in the chrome: pseudo protocol, such as chrome://global/content/config.xul.
nsIAnnotationService
do not use characters that are not valid in urls such as spaces, ":", commas, or most other symbols.
... do not use characters that are not valid in urls such as spaces, ":", commas, or most other symbols.
... do not use characters that are not valid in urls such as spaces, ":", commas, or most other symbols.
... do not use characters that are not valid in urls such as spaces, ":", commas, or most other symbols.
Using files from web applications - Web APIs
using object urls the dom url.createobjecturl() and url.revokeobjecturl() methods let you create simple url strings that can be used to reference any data that can be referred to using a dom file object, including local files on the user's computer.
...while they are released automatically when the document is unloaded, if your page uses them dynamically you should release them explicitly by calling url.revokeobjecturl(): url.revokeobjecturl(objecturl); example: using object urls to display images this example uses object urls to display image thumbnails.
...y = event.datatransfer.files; for (let i=0; i<filesarray.length; i++) { sendfile(filesarray[i]); } } } </script> </head> <body> <div> <div id="dropzone" style="margin:30px; width:500px; height:300px; border:1px dotted grey;">drag & drop your file here...</div> </div> </body> </html> example: using object urls to display pdf object urls can be used for other things than just images!
... <iframe id="viewer"> and here is the change of the src attribute: const obj_url = url.createobjecturl(blob); const iframe = document.getelementbyid('viewer'); iframe.setattribute('src', obj_url); url.revokeobjecturl(obj_url); example: using object urls with other file types you can manipulate files of other formats the same way.
URL() - Web APIs
WebAPIURLURL
if the given base url or the resulting url are not valid urls, the javascript typeerror exception is thrown.
... exceptions exception explanation typeerror url (in the case of absolute urls) or base + url (in the case of relative urls) is not a valid url.
... examples // base urls let m = 'https://developer.mozilla.org'; let a = new url("/", m); // => 'https://developer.mozilla.org/' let b = new url(m); // => 'https://developer.mozilla.org/' new url('docs', b); // => 'https://developer.mozilla.org/docs' let d = new url('/docs', b); // => 'https://developer.mozilla.org/docs' new url('/docs', d); // => 'https://developer.mozilla.org/docs' new url('/docs', a); // => 'https://developer.mozilla.org/docs' new url('/docs', "https://developer.mozilla.org/fr-fr/toto"); // => 'https://developer.mozilla.org/do...
...' is not a valid url new url('/docs'); // raises a typeerror exception as '/docs' is not a valid url new url('http://www.example.com', ); // => 'http://www.example.com/' new url('http://www.example.com', b); // => 'http://www.example.com/' new url("//foo.com", "https://example.com") // => 'https://foo.com' (see relative urls) specification specification status comment urlthe definition of 'url.url()' in that specification.
URL - Web APIs
WebAPIURL
the url interface is used to parse, construct, normalize, and encode urls.
... searchparams read only a urlsearchparams object which can be used to access the individual query parameters found in search.
...tor takes a url parameter, and an optional base parameter to use as a base if the url parameter is a relative url: const url = new url('../cats', 'http://www.example.com/dogs'); console.log(url.hostname); // "www.example.com" console.log(url.pathname); // "/cats" url properties can be set to construct the url: url.hash = 'tabby'; console.log(url.href); // "http://www.example.com/cats#tabby" urls are encoded according to the rules found in rfc 3986.
... for instance: url.pathname = 'démonstration.html'; console.log(url.href); // "http://www.example.com/d%c3%a9monstration.html" the urlsearchparams interface can be used to build and manipulate the url query string.
CSP: base-uri - HTTP
the http content-security-policy base-uri directive restricts the urls which can be used in a document's <base> element.
...if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: connect-src - HTTP
the http content-security-policy (csp) connect-src directive restricts the urls which can be loaded using script interfaces.
...if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: form-action - HTTP
the http content-security-policy (csp) form-action directive restricts the urls which can be used as the target of a form submissions from a given context.
...if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: navigate-to - HTTP
the http content-security-policy (csp) navigate-to directive restricts the urls to which a document can initiate navigations by any means including <form> (if form-action is not specified), <a>, window.location, window.open, etc.
...if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: prefetch-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
... example prefetch resources do not match header given a page with the following content security policy: content-security-policy: prefetch-src https://example.com/ fetches for the following code will return network errors, as the urls provided do not match prefetch-src's source list: <link rel="prefetch" src="https://example.org/"></link> <link rel="prerender" src="https://example.org/"></link> specification specification status comment content security policy level 3the definition of 'prefetch-src' in that specification.
CSP: script-src-attr - HTTP
this includes only inline script event handlers like onclick, but not urls loaded directly into <script> elements.
...if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: script-src - HTTP
this includes not only urls loaded directly into <script> elements, but also things like inline script event handlers (onclick) and xslt stylesheets which can trigger script execution.
...if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
url - Archive of obsolete content
experimental construct, validate, and parse urls.
... base : string an optional string used to resolve relative source urls into absolute ones.
... var urls = require("sdk/url"); console.log(urls.gettld("http://www.bbc.co.uk/")); // "co.uk" console.log(urls.gettld("https://developer.mozilla.org/")); // "org" parameters url : string the url, as a string.
Downloading Files - Archive of obsolete content
var privacy = privatebrowsingutils.privacycontextfromwindow(urlsourcewindow); persist.persistflags = persist.persist_flags_from_cache | persist.persist_flags_replace_existing_files; persist.saveuri(uritosave, null, null, null, "", targetfile, privacy); if you don't need detailed progress information, you might be happier with nsidownloader.
...var privacy = privatebrowsingutils.privacycontextfromwindow(aurlsourcewindow); var progresselement = document.getelementbyid("progress_element"); persist.progresslistener = { onprogresschange: function(awebprogress, arequest, acurselfprogress, amaxselfprogress, acurtotalprogress, amaxtotalprogress) { var percentcomplete = math.round((acurtotalprogress / amaxtotalprogress) * 100); progresselement.textcontent = percentcomplete +"%"; }, onstatechang...
...var privacy = privatebrowsingutils.privacycontextfromwindow(urlsourcewindow); var hardcodedusername = "ericjung"; var hardcodedpassword = "foobar"; persist.progresslistener = { queryinterface: xpcomutils.generateqi(["nsiauthprompt"]), // implements nsiauthprompt prompt: function(dialogtitle, text, passwordrealm, savepassword, defaulttext, result) { result.value = hardcodedpassword; return true; }, promptpassword: function(dialogtitle, text,...
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
listing 10: creating a backup of a specific file in a separate folder file.initwithpath('c:\\temp\\temp.txt'); backupfolder = file.parent.parent; // c:\ backupfolder.append('backup'); // c:\backup backupfolder.create(components.interfaces.nsifile.directory_type, 0666); file.copyto(backupfolder, file.leafname+'.bak'); converting between file paths and file urls xpcom functions can use both remote resources and local files, and these functions almost always specify their targets using uris.
... local file paths can be converted to file urls, such as file:///c/temp/temp.txt, as shown in listing 11.
...t" listing 12: converting a url to a local file path var url = 'file:///c:/temp/test.txt'; var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); var filehandler = ioservice.getprotocolhandler('file') .queryinterface(components.interfaces.nsifileprotocolhandler); var file = filehandler.getfilefromurlspec(url); var path = file.path; alert(path); // "c:\temp\temp.txt" binary file i/o use streams, as in java, for file i/o in xpcom.
Extensions support in SeaMonkey 2 - Archive of obsolete content
differences as compared to other toolkit/-based applications you need to overlay/open different chrome urls as compared to firefox.
... some urls are listed below: url in firefox url in seamonkey overlays chrome://browser/content/browser.xul chrome://navigator/content/navigator.xul main browser window chrome://browser/content/pageinfo/pageinfo.xul chrome://navigator/content/pageinfo/pageinfo.xul page info window chrome://browser/content/preferences/permissions.xul chrome://communicator/content/permis...onsmanager.xul permissions manager dialog urls added in 2.1 url in firefox url in seamonkey chrome://browser/content/bookmarks/bookmarkspanel.xul chrome://communicator/content/bookmarks/bm-panel.xul chrome://browser/content/places/places.xul chro...
...me://communicator/content/bookma...rksmanager.xul thunderbird uses mostly the same chrome urls for overlaying as seamonkey.
Supporting search suggestions in search plugins - Archive of obsolete content
query urls this optional element is an array of alternate urls for each of the suggestions in thecompletion list .
... query urls are not supported in firefox, and are ignored.
... for example, if the search term is "fir", and you don't need to return descriptions or alternate query urls, you might return the following json: ["fir", ["firefox", "first choice", "mozilla firefox"]] note that in this example, only the query string and completion array are specified, leaving out the optional elements.
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
then we'll modify urls in our files so they point to the right place.
...we need to change some urls in the copy of tinderstatusoverlay.xul to point to the new locations the files will be in when they get installed via the xpi: <?xml version="1.0"?> <?xml-stylesheet href="chrome://tinderstatus/content/tinderstatus.css" type="text/css"?> <overlay id="tinderstatusoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascri...
...pt" src="chrome://tinderstatus/content/tinderstatus.js" /> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" insertbefore="offline-status" status="none"/> </statusbar> </overlay> we also need to change the urls in the copy of tinderstatus.css: statusbarpanel#tinderbox-status { list-style-image: url("chrome://tinderstatus/content/tb-nostatus.png"); } statusbarpanel#tinderbox-status[status="success"] { list-style-image: url("chrome://tinderstatus/content/tb-success.png"); } statusbarpanel#tinderbox-status[status="testfailed"] { list-style-image: url("chrome://tinderstatus/content/tb-testfailed.png"); } statusbarpanel#tinderbox-status[status="busted"] { list-style-image: url("chrome://tinderstatu...
Template Builder Interface - Archive of obsolete content
one more note: the datasources attribute may use either absolute or relative urls.
... relative urls are relative to the xul document the corresponding element is in.
... the rdf service's getdatasource method however, only accepts absolute urls.
Using Remote XUL - Archive of obsolete content
this also means you can't load xul using file:// urls unless you set the preference dom.allow_xul_xbl_for_file to true.
...we want it to load urls in the iframe when we press the buttons or select the menu items.
...</window> the code to load the urls is simple.
Plug-in Development Overview - Gecko Plugin API Reference
sending and receiving streams streams are objects that represent urls and the data they contain.
... working with urls the plug-in api provides methods that plug-ins can use to retrieve data from or post data to a url anywhere on the network, provide hyperlinks to other documents, post form data to cgi scripts using http, or upload files to a remote server using ftp.
... for information about using these methods, see urls.
Index - MDN Web Docs Glossary: Definitions of Web-related terms
domain names are used in urls to identify to which server belong a specific webpage.
... 320 percent-encoding glossary, webmechanics percent-encoding is a mechanism to encode 8-bit characters that have specific meaning in the context of urls.
...this involves taking standard web sites/apps that enjoy all the best parts of the web — such as discoverability via search engines, being linkable via urls, and working across multiple form factors — and supercharging them with modern apis (such as service workers and push) and features that confer other benefits more commonly attributed to native apps.
What are hyperlinks? - Learn web development
back in 1989, tim berners-lee, the web's inventor, spoke of the three pillars on which the web stands: url, an address system that keeps track of web documents http, a transfer protocol to find documents when given their urls html, a document format allowing for embedded hyperlinks as you can see in the three pillars, everything on the web revolves around documents and how to access them.
...being human-readable, urls already made things easier, but it's hard to type a long url whenever you want to access a document.
... to get some more theoretical background, learn about urls and their structure, since every link points to a url.
Client-side storage - Learn web development
the most interesting parts of this are those shown below — to actually display our video blobs in a <video> element, we need to create object urls (internal urls that point to the video blobs stored in memory) using the url.createobjecturl() method.
... once that is done, we can set the object urls to be the values of our <source> element's src attributes, and it works fine.
... function displayvideo(mp4blob, webmblob, title) { // create object urls out of the blobs let mp4url = url.createobjecturl(mp4blob); let webmurl = url.createobjecturl(webmblob); ...
Client-Server Overview - Learn web development
the web server detects that the request is "dynamic" and forwards it to the web application for processing (the web server determines how to handle different urls based on pattern matching rules defined in its configuration).
... one of the most important operations they perform is providing simple mechanisms to map urls for different resources/pages to specific handler functions.
... # file: best/urls.py # from django.conf.urls import url from .
Server-side web frameworks - Learn web development
they provide tools and libraries that simplify common web development tasks, including routing urls to appropriate handlers, interacting with databases, supporting sessions and user authorization, formatting output (e.g.
... # return httpresponse return httpresponse('output string to return') route requests to the appropriate handler most sites will provide a number of different resources, accessible through distinct urls.
...like django it provides standard mechanisms for routing urls, accessing data from a database, generating html from templates and formatting data as json or xml.
inIDOMUtils
components.classes["@mozilla.org/inspector/dom-utils;1"] .getservice(components.interfaces.inidomutils); method overview void addpseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); void clearpseudoclasslocks(in nsidomelement aelement); [implicit_jscontext] jsval colornametorgb(in domstring acolorname); nsiarray getbindingurls(in nsidomelement aelement); nsidomnodelist getchildrenfornode(in nsidomnode anode, in boolean ashowinganonymouscontent); unsigned long long getcontentstate(in nsidomelement aelement); void getcsspropertynames([optional] in unsigned long aflags, [optional] out unsigned long acount, [retval, array, size_is(acount)] out wstring aprops); nsisupportsarray getcssst...
... value state 1 :active 2 :focus 4 :hover 8 :-moz-drag-over 16 :target 1<<29 :-moz-focusring methods getbindingurls() returns an array of nsiuri objects representing the current xml binding for the specified element.
... nsiarray getbindingurls( in nsidomelement aelement ); parameters aelement a dom element to retrieve the bindings of.
nsIMessenger
urlarray an array of urls for each attachment.
... urlarray an array of urls for each attachment.
... messageuriarray an array of urls for the message containing each attachment.
nsIMsgDBView
geturisforselection() gets an arry of urls for all currently selected messages.
... void geturisforselection([array, size_is(count)] out string uris, out unsigned long count); return values uris an array of urls for the selected messages.
... count the number of urls returned.
nsIMsgWindow
method overview void displayhtmlinmessagepane(in astring title, in astring body, in boolean clearmsghdr); void stopurls(); void closewindow(); attributes attribute type description windowcommands nsimsgwindowcommands this allows the backend code to send commands to the ui, such as clearmsgpane.
... stopurls() this is equivalent to calling stop(nsiwebnavigation::stop_network) on the nsiwebnavigation object.
... void stopurls(); closewindow() when the msg window is being unloaded from the content window, this notification can be used to force a flush on anything the message window hangs on.
Plug-in Development Overview - Plugins
sending and receiving streams streams are objects that represent urls and the data they contain.
... working with urls the plug-in api provides methods that plug-ins can use to retrieve data from or post data to a url anywhere on the network, provide hyperlinks to other documents, post form data to cgi scripts using http, or upload files to a remote server using ftp.
... for information about using these methods, see urls.
Network request list - Firefox Developer Tools
blocking specific urls if you want to view your page as it would look without a resource (e.g., if it were blocked by the browser or an extension), you can block requests matching patterns you specify.
... note: (starting in firefox 80) you can also block and unblock urls from the web console, using the :block and :unblock helper commands.
... url use the filter urls box in the toolbar.
DirectoryReaderSync - Web APIs
you can do that by passing a list of filesystem: urls—which are just strings—instead of a list of entries.
... window.resolvelocalfilesystemurl = window.resolvelocalfilesystemurl || window.webkitresolvelocalfilesystemurl; // create web workers var worker = new worker('worker.js'); worker.onmessage = function(e) { var urls = e.data.entries; urls.foreach(function(url, i) { window.resolvelocalfilesystemurl(url, function(fileentry) { // print out file's name.
...self.requestfilesystemsync = self.webkitrequestfilesystemsync || self.requestfilesystemsync; // global for holding the list of entry file system urls.
Node.baseURI - Web APIs
WebAPINodebaseURI
the base url is used to resolve relative urls when the browser needs to obtain an absolute url, for example when processing the html <img> element's src attribute or xml xlink:href attribute.
... details the base url of a document the base url of a document defaults to the document's address (as displayed by the browser and available in window.location), but it can be changed: when an html <base> tag is found in the document when the document is new (created dynamically) see the base urls section of the html living standard for details.
...note that obtaining the base url for a document may return different urls over time if the <base> tags or the document's location change.
RTCConfiguration.iceServers - Web APIs
each object must at least have an urls property, which is an array of one or more strings, each providing one server's url.
...the second server has two urls: stun:stun.example.com and stun:stun-1.example.com.
... var configuration = { iceservers: [{ urls: "stun:stun.services.mozilla.com", username: "louis@mozilla.com", credential: "webrtcdemo" }, { urls: ["stun:stun.example.com", "stun:stun-1.example.com"] }] }; var pc = new rtcpeerconnection(configuration); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcconfiguration.iceservers' in that specification.
RTCPeerConnection.setConfiguration() - Web APIs
exceptions invalidaccesserror one or more of the urls specified in configuration.iceservers is a turn server, but complete login information is not provided (that is, either the rtciceserver.username or rtciceserver.credentials is missing).
... syntaxerror one or more of the urls provided in the configuration.iceservers list is invalid.
... var restartconfig = { iceservers: [{ urls: "turn:asia.myturnserver.net", username: "allie@oopcode.com", credential: "topsecretpassword" }] }; mypeerconnection.setconfiguration(restartconfig); mypeerconnection.createoffer({"icerestart": true}).then(function(offer) { return mypeerconnection.setlocaldescription(offer); }) .then(function() { // send the offer to the other peer using the signaling server }) .catch(reporterror); first, a new rtcconfiguration is created, restartconfig, specifying the new ice server and its credentials.
URL.createObjectURL() - Web APIs
examples see using object urls to display images.
... browsers will release object urls automatically when the document is unloaded; however, for optimal performance and memory usage, if there are safe times when you can explicitly unload them, you should do so.
... using object urls for media streams in older versions of the media source specification, attaching a stream to a <video> element required creating an object url for the mediastream.
URL.origin - Web APIs
WebAPIURLorigin
the exact structure varies depending on the type of url: for http or https urls, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified).
... for file: urls, the value is browser dependant.
... for blob: urls, the origin of the url following blob: will be used, e.g "blob:https://mozilla.org" will be returned as "https://mozilla.org".
URLUtilsReadOnly - Web APIs
the obsolete urlutilsreadonly interface previously defined utility methods for working with urls.
...msung interneturlutilsreadonlychrome no support noedge no support nofirefox full support 57 full support 57 no support 3.5 — 57notes notes firefox has a bug whereby single quotes contained in urls are escaped when accessed via url apis (see bug 1386683).ie no support noopera no support nosafari no support nowebview android no support nochrome android no support nofiref...
...ox android full support 57 full support 57 no support 4 — 57notes notes firefox has a bug whereby single quotes contained in urls are escaped when accessed via url apis (see bug 1386683).opera android no support nosafari ios no support nosamsung internet android no support nohash experimentalchrome no support noedge no support nofirefox full support 38 full support 38 ...
<url> - CSS: Cascading Style Sheets
WebCSSurl
urls can be used in numerous css properties, such as background-image, cursor, and list-style.
... in css level 1, the url() functional notation described only true urls.
...relative urls are allowed, and are relative to the url of the stylesheet (not to the url of the web page).
Using the application cache - HTML: Hypertext Markup Language
how the application cache works enabling the application cache to enable the application cache for an application, include the manifest attribute in the <html> element: <html manifest="/example.appcache"> … </html> the manifest attribute references a url for a cache manifest file: a text file that lists urls that browsers should cache for your application.
...(absolute urls must be from the same origin as the application).
...resources can be specified using either absolute or relative urls (e.g., index.html).
Identifying resources on the Web - HTTP
urls and urns urls the most common form of uri is the uniform resource locator (url), which is known as the web address.
... https://developer.mozilla.org https://developer.mozilla.org/docs/learn/ https://developer.mozilla.org/search?q=url any of those urls can be typed into your browser's address bar to tell it to load the associated page (resource).
... usage notes when using urls in html content, you should generally only use a few of these url schemes.
CSP: child-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: default-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: font-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: frame-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: img-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: manifest-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: media-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: object-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: script-src-elem - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: style-src-attr - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: style-src-elem - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: style-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method than using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
CSP: upgrade-insecure-requests - HTTP
the http content-security-policy (csp) upgrade-insecure-requests directive instructs user agents to treat all of a site's insecure urls (those served over http) as though they have been replaced with secure urls (those served over https).
... this directive is intended for web sites with large numbers of insecure legacy urls that need to be rewritten.
... <img src="http://example.com/image.png"> <img src="http://not-example.com/image.png"> these urls will be rewritten before the request is made, meaning that no insecure requests will hit the network.
CSP: worker-src - HTTP
if you only need to allow inline event handlers and not inline <script> elements or javascript: urls, this is a safer method compared to using the unsafe-inline expression.
... 'unsafe-inline' allows the use of inline resources, such as inline <script> elements, javascript: urls, inline event handlers, and inline <style> elements.
... 'none' refers to the empty set; that is, no urls match.
Proxy Auto-Configuration (PAC) file - HTTP
the path and query components of https:// urls are stripped.
... in chrome (versions 52 to 73), you can disable this by setting pachttpsurlstrippingenabled to false in policy or by launching with the --unsafe-pac-url command-line flag (in chrome 74, only the flag works, and from 75 onward, there is no way to disable path-stripping; as of chrome 81, path-stripping does not apply to http urls, but there is interest in changing this behavior to match https); in firefox, the preference is network.proxy.autoconfig_url.include_path.
... note the order of the above exceptions for efficiency: localhostordomainis() functions only get executed for urls that are in local domain, not for every url.
Same-origin policy - Web security
definition of an origin two urls have the same origin if the protocol, port (if specified), and host are the same for both.
...age.html failure different protocol http://store.company.com:81/dir/page.html failure different port (http:// is port 80 by default) http://news.company.com/dir/page.html failure different host inherited origins scripts executed from pages with an about:blank or javascript: url inherit the origin of the document containing that url, since these types of urls do not contain information about an origin server.
... data: urls get a new, empty, security context.
loader/sandbox - Archive of obsolete content
load scripts this module provides a limited api for loading scripts from local urls.
... data: urls are supported.
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
chrome urls are structured as: chrome://%package name%/%package type%/%relative path to source file% for example, the chrome url for the firefox browser window is as follows: chrome://browser/content/browser.xul here, the package name is “browser”, the file “browser.xul”, and the type of the package is “content”.
... source files represented through chrome urls run with universalxpconnect privileges; even if they haven’t been granted “use xpconnect as local file” privileges, as discussed in chapter 4, they will be able to use xpcom functions (figure 1).
Index of archived content - Archive of obsolete content
windows xml-related code snippets xml:base support in old browsers xpath getattributens common pitfalls communication between html and your extension creating custom firefox extensions with the mozilla build system custom about: urls default preferences deploying a plugin as an extension developing add-ons displaying web content in an extension without security issues downloading json and javascript in extensions enhanced extension installation extension etiquette extension library extension packaging extension samples ...
... html http request the new nsstring class implementation (1999) tracevis transforming xml with xslt:mozilla xslt transforming xml with xslt:the netscape xslt treehydra treehydra build instructions treehydra manual tuning pageload urischeme uris and urls uriloader using addresses of stack variables with nspr threads on win16 using cross commit using gdb on wimpy computers venkman using breakpoints in venkman venkman internals venkman introduction video presentations when to use ifdefs w...
Java in Firefox Extensions - Archive of obsolete content
a class loader, and finally pass the classloader and array to a function which gives the necessary privileges: // this function will be called to give the necessary privileges to your jar files // however, the policy never comes into play, because // (1) adding permissions doesn't add to the policy itself, and // (2) addurl alone does not set the grant codebase function policyadd (loader, urls) { try { //if have trouble with the policy try changing it to //edu.mit.simile.javafirefoxextensionutils.urlsetpolicy var str = 'edu.mit.simile.javafirefoxextensionutils.urlsetpolicy'; var policyclass = java.lang.class.forname( str, true, loader ); var policy = policyclass.newinstance(); ...
... policy.setouterpolicy(java.security.policy.getpolicy()); java.security.policy.setpolicy(policy); policy.addpermission(new java.security.allpermission()); for (var j=0; j < urls.length; j++) { policy.addurl(urls[j]); } }catch(e) { alert(e+'::'+e.linenumber); } } //get extension folder installation path...
Supporting private browsing mode - Archive of obsolete content
note: it is not acceptable for an extension that records things like urls or domains visited to even offer the option to opt out of private browsing mode.
...the following categories define what's considered "sensitive" data: the urls of pages the user has visited.
Elements - Archive of obsolete content
xml starting with firefox 3, you can also use a data: url to embed the binding inline: div { -moz-binding: url(data:text/xml;charset=utf-8,%3c%3fxml%20version%3d%221.0%22%3f%3e%0a%3cbindings%20id%3d%22xbltestbindings%22%20xmlns%3d%22http%3a//www.mozilla.org/xbl%22%3e%0a%20%20%3cbinding%20id%3d%22xbltest%22%3e%3ccontent%3epass%3c/content%3e%3c/binding%3e%0a%3c/bindings%3e%0a); } since data: urls don't support fragment identifiers, the first binding found in the embedded xml is used instead.
...in addition, data: urls are only supported from chrome code (in other words, from the application or an extension).
Simple Example - Archive of obsolete content
kin/images/t/palace.jpg" dc:title="palace from above"/> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/canal.jpg" dc:title="canal"/> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg" dc:title="obelisk"/> </rdf:rdf> in this example, we have three images, which can be identified by urls.
... the resource uris correspond to their actual urls although this isn't necessary.
Adding Event Handlers - Archive of obsolete content
you may use relative or absolute urls.
... for example, you may use urls of the following form: <script src="findfile.js"/> <script src="chrome://findfiles/content/help.js"/> <script src="http://www.example.com/js/items.js"/> this tutorial does not attempt to describe how to use javascript (except as related to event handling) as this is a fairly large topic and there are plenty of other resources that are available for this.
Writing Skinnable XUL and CSS - Archive of obsolete content
image chrome urls should never occur in xul.
...note that some particularly evil people put images chrome urls in dtds.
browser - Archive of obsolete content
get firefox most of the properties and methods of the browser will rarely be used and can only be called from chrome urls.
... other urls will need to use the document and history objects to change the displayed document.
Archived Mozilla and build documentation - Archive of obsolete content
microsummary generators use them to identify the pages that the generators know how to summarize by matching patterns in those pages' urls.
... uris and urls handling network and locally retrievable resources is a central part of necko.
NPAPI plugin developer guide - Archive of obsolete content
or plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction init...
...treams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in sending the stream in random-access mode sending the stream in file mode sending a stream creating a stream pushing data into the stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to an ftp server sending mail memory allocating and freeing memory mac os flushing memory (mac os only) version, ui, and status information displaying a status line message getting agent information getting the current version ...
NPN_GetURL - Archive of obsolete content
for http urls, the browser resolves this method as the http server method get, which requests url objects.
...the following recommendations about target choice apply to other methods that handle urls as well.
RDF in Mozilla FAQ - Archive of obsolete content
they initialize xpcom and bring up necko to be able to load and process urls just like mozilla does.
... please mail danbri, mozilla-rdf or waterson with urls if you are aware of other examples to which we ought to link!
Navigation directive - MDN Web Docs Glossary: Definitions of Web-related terms
list of csp navigation directives form-action restricts the urls which can be used as the target of a form submissions from a given context.
... navigate-to restricts the urls to which a document can initiate navigation by any means, including <form> (if form-action is not specified), <a>, window.location, window.open, etc.
Percent-encoding - MDN Web Docs Glossary: Definitions of Web-related terms
percent-encoding is a mechanism to encode 8-bit characters that have specific meaning in the context of urls.
... '(' ')' '*' '+' ',' ';' '=' '%' ' ' %3a %2f %3f %23 %5b %5d %40 %21 %24 %26 %27 %28 %29 %2a %2b %2c %3b %3d %25 %20 or + depending on the context, the character ' ' is translated to a '+' (like in the percent-encoding version used in an application/x-www-form-urlencoded message), or in '%20' like on urls.
Sending form data - Learn web development
if you need to send a large amount of data, the post method is preferred because some browsers limit the sizes of urls.
... in addition, many servers limit the length of urls they accept.
Index - Learn web development
beginner, infrastructure, needsactivelearning, url, resources, urls with hypertext and http, url is one of the key concepts of the web.
... 232 creating hyperlinks beginner, codingscripting, guide, html, http, learn, links, title, absolute, href, hyperlinks, relative, urls that's it for links, for now anyway!
Graceful asynchronous programming with Promises - Learn web development
here we use some fairly simple sync code to store the results in separate variables (creating object urls from the blobs), then display the images and text on the page.
... console.log(values); // store each value returned from the promises in separate variables; create object urls from the blobs let objecturl1 = url.createobjecturl(values[0]); let objecturl2 = url.createobjecturl(values[1]); let desctext = values[2]; // display the images in <img> elements let image1 = document.createelement('img'); let image2 = document.createelement('img'); image1.src = objecturl1; image2.src = objecturl2; document.body.appendchild(image1); document.body.appendchild(image2); // display the text in a paragraph let para = document.createelement('p'); para.textcontent = desctext; document.body.appendchild(para); save and refresh and you should see your ui components all loaded, albeit in a not particularly attractive way!
Adding phishing protection data providers
phishing protection technology lets firefox help protect users by comparing the urls the user visits to a list of known scam sites, and presenting a warning to the user when they visit a site on the list.
... browser.safebrowsing.provider.idnum.lookupurl the url to use to look up urls to see if they're block-listed.
Command line options
you may list multiple urls, separated by spaces.
... firefox www.mozilla.com firefox www.mozilla.com developer.mozilla.org note: when opening multiple urls, firefox always opens them as tabs in a new window.
Creating Sandboxed HTTP Connections
to create an nsiuri from an string, we use the newuri method of nsiioservice: // the io service var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); once the nsiuri has been created, a nsichannel can be generated from it using nsiioservice's newchannelfromuri method: // get a channel for that nsiuri var channel = ioservice.newchannelfromuri(uri); to initiate the connection, the asyncopen method is called.
...below is an example: // global channel var gchannel; // init the channel // the io service var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); // get a channel for that nsiuri gchannel = ioservice.newchannelfromuri(uri); // get an listener var listener = new streamlistener(callbackfunc); gchannel.notificationcallbacks = listener; gchannel.asyncopen(listener, null); function streamlistener(acallbackfunc) { this.mcallbackfunc = acallbackfunc; } streamlistener.prototype = { mdata: "", // nsistreamlistener o...
ChromeWorker
addons must use absolute urls to load their workers, and those urls have to be using a chrome:// or resource:// protocol (file:// is not accepted).
... addons that wish to use file:// urls must first register a resource replacement path, using code like this: var fileuri = services.io.newfileuri(file); services.io.getprotocolhandler('resource').
SourceMap.jsm
sources: an array of urls to the original source files.
... sourceroot: an optional root for all relative urls in this source map.
Using JavaScript code modules
details on doing this are in the "extending resource: urls" section below.
... examples a template to download and edit is seen here on github - gists - _template-bootstrapjsm.xpi extending resource: urls prior to gecko 2.0, the most common way to load code modules was using resource: urls.
Places Developer Guide
newuri(spec, null, null); } var browserhistory = histsvc.queryinterface(ci.nsibrowserhistory); var oururi = uri("http://www.mozilla.com"); // remove all visits for a single url from history browserhistory.removepage(oururi); // remove all visits for multiple urls from history var uristodelete = [oururi]; // will call nsinavhistoryobserver.onbeginupdatebatch/onendupdatebatch var donotify = false; browserhistory.removepages(uristodelete, uristodelete.length, donotify); // remove all visits within a given time period var enddate = date.now() * 1000; // now, in microseconds var startdate = enddate - (7 * 86400 * 1000 * 1000); // one week ago, in microseconds...
... browserhistory.removepagesbytimeframe(startdate, enddate); // remove all pages for a given host var entiredomain = true; // will delete from all hosts from the given domain browserhistory.removepagesfromhost("mozilla.com", true); // remove all history visits browserhistory.removeallpages(); querying history the code sample below queries the browser history for the ten most visited urls in the browser history.
Building the WebLock UI
this is a bit more complicated, because it requires that you work with the currently loaded page or provide other ui (e.g., a textfield where you can enter an arbitrary url) for specifying urls.
...in this tutorial, focusing as it is on the weblock functionality (rather than the ui), we'll assume the strings we get from the ui itself are urls we actually want to write to the white list: function addthissite() { var tf = document.getelementbyid("dialog.input"); // weblock is global and declared above weblock.addsite(tf.value); } this javascript function can be called directly from the xul widget, where the input string is retrieved as the value property of the textbox element.
Index
MozillaTechXPCOMIndex
when the component starts up, it populates a list of urls read in from a file stored next to the gecko binary on the local system.
...their anchors would also reference the image object and their anchortargets would reference urls or the objects that would be activated.
Components.utils.import
note: prior to gecko 2.0, javascript code modules could only be loaded using file: or resource: urls.
... gecko 2.0 adds support for loading modules from chrome: urls, even those inside jar archives.
mozITXTToHTMLConv
kurls unsigned long enables automatic addition of hyperlinks for urls in the text.
... remarks you can call this method repeatedly, passing in updated values for apos, to locate all the urls in a string.
nsIChromeRegistry
this is useful because chrome urls are allowed to be specified in "shorthand", leaving the "file" portion off.
...this is useful because chrome urls are allowed to be specified in "shorthand", leaving the "file" portion off.
nsIDOMWindowUtils
query_content_flag_selection_urlsecondary 0x0200 one of values of aadditionalflags of sendquerycontentevent().
... query_content_flag_selection_urlstrikeout 0x0400 one of values of aadditionalflags of sendquerycontentevent().
nsIIOService
implemented by @mozilla.org/network/io-service;1 as a service: var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); method overview boolean allowport(in long aport, in string ascheme); acstring extractscheme(in autf8string urlstring); unsigned long getprotocolflags(in string ascheme); nsiprotocolhandler getprotocolhandler(in string ascheme); nsichannel newchannel(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); obsolete since gecko 48 nsichannel newchannel2(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri, in nsidomnode aloadingnode, in nsiprincip...
... acstring extractscheme( in autf8string urlstring ); parameters urlstring the string for the url to extract the scheme from.
Plug-in Basics - Plugins
with the plug-in api, you can create dynamically loaded plug-ins that can: register one or more mime types draw into a part of a browser window receive keyboard and mouse events obtain data from the network using urls post data to urls add hyperlinks or hotspots that link to new urls draw into sections on an html page communicate with javascript/dom from native code you can see which plug-ins are installed on your system and have been properly associated with the browser by consulting the installed plug-ins page.
... </object> the first set of object element attributes are urls.
Gecko Plugin API Reference - Plugins
or plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction init...
...treams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in sending the stream in random-access mode sending the stream in file mode sending a stream creating a stream pushing data into the stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files to an ftp server sending mail memory allocating and freeing memory mac os flushing memory (mac os only) version, ui, and status information displaying a status line message getting agent information getting the current version ...
Cache.addAll() - Web APIs
WebAPICacheaddAll
the addall() method of the cache interface takes an array of urls, retrieves them, and adds the resulting response objects to the given cache.
... syntax cache.addall(requests[]).then(function() { // requests have been added to the cache }); parameters requests an array of string urls that you want to be fetched and added to the cache.
Using images - Web APIs
data urls allow you to completely define an image as a base64 encoded string of characters directly in your code.
... var img = new image(); // create new img element img.src = 'data:image/gif;base64,r0lgodlhcwalaiaaaaaa3pn/zih5baeaaaealaaaaaalaasaaaiuha+hkcuo4lmnvindo7qyrixigbyaow=='; one advantage of data urls is that the resulting image is available immediately without another round trip to the server.
Content Index API - Web APIs
the content index api is an extension to service workers, which allows developers to add urls and metadata of already cached pages, under the scope of the current service worker.
... the api supports indexing urls corresponding to html documents.
ExtendableEvent - Web APIs
var cache_version = 1; var current_caches = { prefetch: 'prefetch-cache-v' + cache_version }; self.addeventlistener('install', function(event) { var urlstoprefetch = [ './static/pre_fetched.txt', './static/pre_fetched.html', 'https://www.chromium.org/_/rsrc/1302286216006/config/customlogo.gif' ]; console.log('handling install event.
... resources to pre-fetch:', urlstoprefetch); event.waituntil( caches.open(current_caches['prefetch']).then(function(cache) { return cache.addall(urlstoprefetch.map(function(urltoprefetch) { return new request(urltoprefetch, {mode: 'no-cors'}); })).then(function() { console.log('all resources have been fetched and cached.'); }); }).catch(function(error) { console.error('pre-fetching failed:', error); }) ); }); important: when fetching resources, it's very important to use {mode: 'no-cors'} if there is any chance that the resources are served off of a server that doesn't support cors.
HTMLHyperlinkElementUtils.search - Web APIs
modern browsers provide urlsearchparams and url.searchparams to make it easy to parse out the parameters from the querystring.
... syntax string = object.search; object.search = string; examples // let an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let params = new urlsearchparams(querystring); let q = parseint(params.get("q")); // is the number 123 specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.search' in that specification.
InstallEvent - Web APIs
var cache_version = 1; var current_caches = { prefetch: 'prefetch-cache-v' + cache_version }; self.addeventlistener('install', function(event) { var urlstoprefetch = [ './static/pre_fetched.txt', './static/pre_fetched.html', 'https://www.chromium.org/_/rsrc/1302286216006/config/customlogo.gif' ]; console.log('handling install event.
... resources to pre-fetch:', urlstoprefetch); event.waituntil( caches.open(current_caches['prefetch']).then(function(cache) { return cache.addall(urlstoprefetch.map(function(urltoprefetch) { return new request(urltoprefetch, {mode: 'no-cors'}); })).then(function() { console.log('all resources have been fetched and cached.'); }); }).catch(function(error) { console.error('pre-fetching failed:', error); }) ); }); specifications specification status comment service workers working draft as of may 2015, the install event is an instance of extendableevent rather than a child of it.
Location: search - Web APIs
WebAPILocationsearch
modern browsers provide urlsearchparams and url.searchparams to make it easy to parse out the parameters from the querystring.
... syntax string = object.search; object.search = string; examples // let an <a id="myanchor" href="https://developer.mozilla.org/docs/location.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let params = new urlsearchparams(querystring); let q = parseint(params.get("q")); // is the number 123 specifications specification status comment html living standardthe definition of 'search' in that specification.
MediaDevices.getUserMedia() - Web APIs
a document loaded using a data:// or blob:// url which has no origin (such as when one of these urls is typed by the user into the address bar) cannot call getusermedia().
... these kinds of urls loaded from javascript code inherit the script's permissions.
PasswordCredential.additionalData - Web APIs
the additionaldata property of the passwordcredential interface takes one of a formdata instance, a urlsearchparams instance, or null.
... syntax passwordcredential.additionaldata = formdata formdata = passwordcredential.additionaldata passwordcredential.additionaldata = urlsearchparams ulrsearchparams = passwordcredential.additionaldata value one of a formdata instance, a urlsearchparams instance, or null.
RTCConfiguration - Web APIs
the second server has two urls: stun:stun.example.com and stun:stun-1.example.com.
... var configuration = { iceservers: [{ urls: "stun:stun.services.mozilla.com", username: "louis@mozilla.com", credential: "webrtcdemo" }, { urls: ["stun:stun.example.com", "stun:stun-1.example.com"] }] }; var pc = new rtcpeerconnection(configuration); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcconfiguration' in that specification.
RTCIceServer.url - Web APIs
WebAPIRTCIceServerurl
you should instead use the newer urls property, which allows you to optionally specify multiple urls for the server.
...the urls property lets you include them both in one server, which is more readily maintainable.
Reporting API - Web APIs
origins and endpoints each unique origin you want to retrieve reports for can be given a series of endpoints, which are urls that can receive given reports from a user agent.
...you can then retrieve reports by making a request to those urls.
URL.searchParams - Web APIs
WebAPIURLsearchParams
the searchparams readonly property of the url interface returns a urlsearchparams object allowing access to the get decoded query arguments contained in the url.
... syntax const urlsearchparams = url.searchparams value a urlsearchparams object.
ValidityState.typeMismatch - Web APIs
the url input type expects one or more valid email urls, depending on whether the multiple attribute is present.
...if the value of the url input is not an empty string, a single valid url, or one or more comma separated urls if the multiple attribute is present, there is a typemismatch.
Signaling and video calling - Web APIs
{ urls: "stun:stun.stunprotocol.org" } ] }); mypeerconnection.onicecandidate = handleicecandidateevent; mypeerconnection.ontrack = handletrackevent; mypeerconnection.onnegotiationneeded = handlenegotiationneededevent; mypeerconnection.onremovetrack = handleremovetrackevent; mypeerconnection.oniceconnectionstatechange = handleiceconnectionstatechangeevent; mypeerconnection.on...
... each object in iceservers contains at least a urls field providing urls at which the specified server can be reached.
Window.open() - Web APIs
WebAPIWindowopen
note that remote urls won't load immediately.
...the javascript console in mozilla-based browsers will report the warning message: "scripts may not close windows that were not opened by script." otherwise the history of urls visited during the browser session would be lost.
url() - CSS: Cascading Style Sheets
WebCSSurl()
} @import url("https://www.example.com/style.css"); @namespace url(http://www.w3.org/1999/xhtml); relative urls, if used, are relative to the url of the stylesheet (not to the url of the web page).
... the url() function can be included as a value for background, background-image, list-style, list-style-image, content, cursor, border, border-image, border-image-source, mask, mask-image, src as part of a @font-face block, and @counter-style/symbol in css level 1, the url() functional notation described only true urls.
HTML attribute reference - HTML: Hypertext Markup Language
ping <a>, <area> the ping attribute specifies a space-separated list of urls to be notified if a user follows the hyperlink.
... idl attributes can reflect other types such as unsigned long, urls, booleans, etc.
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
#bb0000</option> </datalist> <datalist id="numbersxx"> <option>0</option> <option>2</option> <option>4</option> <option>8</option> <option>16</option> <option>32</option> <option>64</option> </datalist> <datalist id="fruitsxx"> <option>cherry</option> <option>banana</option> <option>mango</option> <option>orange</option> <option>blueberry</option> </datalist> <datalist id="urlsxx"> <option>https://developer.mozilla.org</option> <option>https://caniuse.com/</option> <option>https://mozilla.com</option> <option>https://mdn.github.io</option> <option>https://www.youtube.com/user/firefoxchannel</option> </datalist> <p><label for="textx">text</label> <input type="text" list="fruitsxx" id="textx"/></p> <p><label for="colorx">color</label> <input type="color" list="...
...colorsxx" id="colorx"/></p> <p><label for="rangex">range</label> <input type="range" min="0" max="64" list="numbersxx" id="rangex"/></p> <p><label for="numberx">number</label> <input type="number" min="0" max="64" list="numbersxx" id="numberx"/></p> <p><label for="urlx">url</label> <input type="url" list="urlsxx" id="urlx"/></p> it is valid on text, search, url, tel, email, date, month, week, time, datetime-local, number, range, and color.
HTTP authentication - HTTP
location /status { auth_basic "access to the staging site"; auth_basic_user_file /etc/apache2/.htpasswd; } access using credentials in the url many clients also let you avoid the login prompt by using an encoded url containing the username and the password like this: https://username:password@www.example.com/ the use of these urls is deprecated.
... in chrome, the username:password@ part in urls is even stripped out for security reasons.
Basics of HTTP - HTTP
resource urls resource urls, those prefixed with the resource scheme are used by firefox and firefox browser extensions to load resources internally, but is also available to some sites the browser connects to as well.
... choosing between www and non-www urls this article provides guidance on how to choose whether to use a www-prefixed domain or not, along with the consequences of that choice.
Link prefetching FAQ - HTTP
yes, only http:// (and, starting in gecko 1.9.1 https://) urls can be prefetched.
...limiting prefetching to only urls from the the same server would not offer any increased browser security.
OpenSearch description format
http: and https: urls are converted to data: uris when this is done.
... url describes the url or urls to use for the search.
<a> - SVG: Scalable Vector Graphics
WebSVGElementa
value type: <string> ; default value: none; animatable: yes ping a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the browser (in the background).
... value type: <list-of-urls> ; default value: none; animatable: no referrerpolicy which referrer to send when fetching the url.
Referer header: privacy and security concerns - Web security
a sensible application would remove such risks by making password reset urls only usable for a single use, or when combined with a unique user token, and transmitting sensitive data in different ways.
... you should use post rather than get wherever possible, to avoid passing sensitive data to other locations via urls.
Secure contexts - Web security
locally-delivered resources such as those with http://127.0.0.1 urls, http://localhost urls (under certain conditions), and file:// urls are also considered to have been delivered securely.
... resources that are not local, to be considered secure, must meet the following criteria: must be served over https:// or wss:// urls the security properties of the network channel used to deliver the resource must not be considered deprecated feature detection pages can use feature detection to check whether they are in a secure context or not by using the issecurecontext boolean, which is exposed on the global scope.
Reddit Example - Archive of obsolete content
event.stoppropagation(); event.preventdefault(); self.port.emit('click', t.tostring()); }); this script uses jquery to interact with the dom of the page and the self.port.emit function to pass urls back to the add-on script.
simple-storage - Archive of obsolete content
for example, this add-on tries to store the urls of pages the user visits: var ss = require("sdk/simple-storage"); ss.storage.pages = []; require("sdk/tabs").on("ready", function(tab) { ss.storage.pages.push(tab.url); }); require("sdk/ui/button/action").actionbutton({ id: "read", label: "read", icon: "./read.png", onclick: function() { console.log(ss.storage.pages); } }); but this isn't going to work, because it empties the ...
tabs - Archive of obsolete content
example var tabs = require("sdk/tabs"); tabs.on('ready', function(tab) { var worker = tab.attach({ contentscript: 'document.body.style.border = "5px solid red";' }); }); parameters options : object optional options: name type contentscriptfile string,array the local file urls of content scripts to load.
High-Level APIs - Archive of obsolete content
url construct, validate, and parse urls.
/loader - Archive of obsolete content
toolkit/foo.js // toolkit/foo/bar -> resource://gre/modules/commonjs/toolkit/foo/bar.js 'toolkit/': 'resource://gre/modules/commonjs/toolkit/', // resolev all other non-relative module requirements as follows: // devtools/gcli -> resource:///modules/devtools/gcli.js // panel -> resource:///modules/panel.js '': 'resource:///modules/', // allow relative urls and resolve them to add-on root: // ./main -> resource://my-addon/root/main.js './': 'resource://my-addon/root/' } }); the order of keys in paths is irrelevant since they are sorted by keys from longest to shortest to allow overlapping mapping.
content/loader - Archive of obsolete content
nframes.add(hiddenframes.hiddenframe({ onready: function onready() { let frame = self._frame = this.element; self._emit('propertychange', { contenturl: self.contenturl }); } })); }, _onchange: function _onchange(e) { if ('contenturl' in e) this._frame.setattribute('src', this._contenturl); } }); loader properties contentscriptfile the local file urls of content scripts to load.
content/symbiont - Archive of obsolete content
symbiont symbiont is composed from the worker trait, therefore instances of symbiont and their descendants expose all the public properties exposed by worker along with additional public properties that are listed below: properties contentscriptfile the local file urls of content scripts to load.
content/worker - Archive of obsolete content
optional options: name type contentscriptfile string,array the local file urls of content scripts to load.
places/favicon - Archive of obsolete content
the platform service (moziasyncfavicons) retrieves favicon data stored from previously visited sites, and as such, will only return favicon urls for visited sites.
Low-Level APIs - Archive of obsolete content
util/match-pattern test strings containing urls against simple patterns.
List Open Tabs - Archive of obsolete content
the following add-on adds an action button that logs the urls of open tabs when the user clicks it: require("sdk/ui/button/action").actionbutton({ id: "list-tabs", label: "list tabs", icon: "./icon-16.png", onclick: listtabs }); function listtabs() { var tabs = require("sdk/tabs"); for (let tab of tabs) console.log(tab.url); } note: to get this working, you will need to save an icon for the button to your add-on's "data" directory as "icon-16.png".
Modifying Web Pages Based on URL - Archive of obsolete content
one or more patterns to match urls for the pages you want to modify.
File I/O - Archive of obsolete content
var file = url.queryinterface(components.interfaces.nsifileurl).file; // file is a nsifile to load from file://, http://, chrome://, resource:// and other urls directly, use xmlhttprequest or netutil.asyncfetch().
Extension Etiquette - Archive of obsolete content
about: page urls.
Install Manifests - Archive of obsolete content
non-secure update urls can be hijacked by a malicious update.rdf file, enabling malware to infiltrate the user's computer.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
gtk icons are accessed using special urls, like this one: moz-icon://stock/gtk-go-back?size=menu.
Appendix D: Loading Scripts - Archive of obsolete content
javascript files or urls may be loaded in this manner by first retrieving their contents into memory using an xmlhttprequest.
Connecting to Remote Content - Archive of obsolete content
you can discover some interesting things about firefox like this, such as the automatic update urls for extensions, and the behavior of web applications such as gmail.
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
* @param {nsiuri} baseuri the base uri relative to which resource * urls should be processed.
JavaScript Object Management - Archive of obsolete content
in particular, chrome: urls (even those that point to a file outside a jar archive) are not valid.
Security best practices in extensions - Archive of obsolete content
non-chrome urls in chrome xul or html such as the following example are not allowed: <script type="text/javascript" src="http://mysite.greatsite.com/js/wow-content.js" /> in general, scripts that are from remote sources that run in the chrome context are not acceptable, as many times the source of the script can never be 100% guaranteed, and they are vulnerable to man-in-the-middle attacks.
Setting up an extension development environment - Archive of obsolete content
also note that the use of proxy files requires that the extension's chrome.manifest defines its chrome urls using traditional directories, rather than a jared structure.
Tabbed browser - Archive of obsolete content
for example: var num = gbrowser.browsers.length; for (var i = 0; i < num; i++) { var b = gbrowser.getbrowseratindex(i); try { dump(b.currenturi.spec); // dump urls of all open tabs to console } catch(e) { components.utils.reporterror(e); } } to learn what methods are available for <browser/> and <tabbrowser/> elements, use dom inspector or look in browser.xml for corresponding xbl bindings (or just look at the current reference pages on browser and tabbrowser.
Search Extension Tutorial (Draft) - Archive of obsolete content
while the former is the simpler method, it does not support complex descriptions containing suggestion urls or separate keyword search urls.
Localizing an extension - Archive of obsolete content
note that the urls of the dtd files don't actually include the name of the localization to use.
MMgc - Archive of obsolete content
this is an unfortunate artifact of the existing code base, the avm+ is relatively clean and its reachability graph consists of basically 2 gc roots (the avmcore and urlstreams) but the avm- has a bunch (currently includes securitycallbackdata, moviecliploader, camerainstance, fappacket, microphoneinstance, csoundchannel, urlrequest, responceobject, urlstream and urlstreamsecurity).
No Proxy For configuration - Archive of obsolete content
all proxied urls will return errors, all non-proxied connections will be attempted normally (direct connection).
Finding the file to modify - Archive of obsolete content
chrome urls have paths that do not necessarily refer to a precise directory hierarchy.
Making a Mozilla installation modifiable - Archive of obsolete content
the registry contains a bunch of complicated configuration statements in which you will find a number of urls of the form jar:resource:/chrome/something.jar!/something-else...
Creating a Help Content Pack - Archive of obsolete content
the glossary file is written in rdf and consists of a simple list of terms with corresponding urls to the term definition.
Basics - Archive of obsolete content
methods open(urlstring)opens a new tab in your browser with a defined url.
Tabs - Archive of obsolete content
ArchiveMozillaJetpackUITabs
methods open(urlstring)opens a new tab in your browser with a defined url.
Microsummary topics - Archive of obsolete content
in the future, firefox may access source urls to download updated versions of generators, so unless you are installing generators which are available from urls, you should not use this form for your programmatically-installed generators.
Mozilla Application Framework in Detail - Archive of obsolete content
its provides a generic and extensible framework for fetching urls with support for common protocols (http, ftp, file, etc.) and a way to plug in custom protocol handlers.
How to Write and Land Nanojit Patches - Archive of obsolete content
(note that nanojit-central revision urls have the form http://hg.mozilla.org/projects/nanojit-central/<revid>, ie.
Configuration - Archive of obsolete content
separate multiple uris with commas: *google.com, *yahoo.com exclude urls that should be opened in the default browser, rather than in the web app.
Remote XUL - Archive of obsolete content
this also means you can't load xul using file:// urls unless you set the preference dom.allow_xul_xbl_for_file to true.
File object - Archive of obsolete content
use of standard "file:" urls is encouraged.
Venkman Internals - Archive of obsolete content
to obtain the antecedent files: doc.getelementsbytagname("script"); then extract the urls from the src attributes.
Binding Attachment and Detachment - Archive of obsolete content
-moz-binding value: none | [,]* <uri> | inherit initial value: none applies to: all elements (not generated content or pseudo-elements) inherited: no percentages: n/a the value of the -moz-binding property is a set of urls that identify specific bindings.
Properties - Archive of obsolete content
note, even if triggered using relative urls this will show the full url (after qualification).
Namespaces - Archive of obsolete content
an uri is any string, although most people choose a url-based uri because urls are an easy way to hope for uniqueness.
Content Panels - Archive of obsolete content
a back button, a forward button and a field for typing is urls has been added to the only toolbar (we'll learn about toolbar in a later section).
Creating a Skin - Archive of obsolete content
if following the example in this section, just copy the files to your new skin and change the urls accordingly.
Creating a Window - Archive of obsolete content
only chrome urls have additional privileges.
Creating a Wizard - Archive of obsolete content
note that wizards currently only work properly from chrome urls.
Introduction to RDF - Archive of obsolete content
instead of the seq element, you can also use bag to indicate unordered data, and alt to indicate data where each record specifies alternative values (such as mirror urls).
List Controls - Archive of obsolete content
for example, the url field in the browser has a drop-down for selecting previously typed urls, but you can also type them in yourself.
Open and Save Dialogs - Archive of obsolete content
note that the file picker only works from chrome urls.
RDF Datasources - Archive of obsolete content
the history list the history datasource provides access to the user's history list which is the list of urls the user has visited recently.
XBL Inheritance - Archive of obsolete content
in this case, the value history is used, which looks up urls in the history.
XPCOM Interfaces - Archive of obsolete content
get a component for the file to copy var afile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); if (!afile) return false; // get a component for the directory to copy to var adir = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); if (!adir) return false; // next, assign urls to the file components afile.initwithpath(sourcefile); adir.initwithpath(destdir); // finally, copy the file, without renaming it afile.copyto(adir,null); } copyfile("/mozilla/testfile.txt","/etc"); xpcom services some xpcom components are special components called services.
XULBrowserWindow - Archive of obsolete content
defaults to about:addons but extensions can append specific urls to the array.
XUL Coding Style Guidelines - Archive of obsolete content
use chrome urls.
stringbundle - Archive of obsolete content
the "src" attribute accepts only absolute chrome:// urls (see bugs 133698, 26291) attributes src properties applocale , src, stringbundle, strings methods getformattedstring, getstring examples (example needed) attributes src type: uri the uri of the property file that contains the localized strings.
Deploying XULRunner - Archive of obsolete content
entifier</key> <string>net.yourcompany.yourapplication</string> <key>cfbundleinfodictionaryversion</key> <string>6.0</string> <key>cfbundlename</key> <string>applicationname</string> <key>cfbundlepackagetype</key> <string>appl</string> <key>cfbundleshortversionstring</key> <string>1.0</string> <key>cfbundlesignature</key> <string>????</string> <!--only useful if your app handle urls--> <key>cfbundleurltypes</key> <array> <dict> <key>cfbundleurliconfile</key> <string>app_icon.icns</string> <key>cfbundleurlname</key> <string>yourapp entity</string> <key>cfbundleurlschemes</key> <array> <string>chrome</string> </array> </dict> </array> <key>cfbundleversion</key> <string>1.0</string> </dict> </plist> here's a sample of the pkginfo file aapl???
Opening a Link in the Default Browser - Archive of obsolete content
this is how you do it: var extps = components.classes["@mozilla.org/uriloader/external-protocol-service;1"] .getservice(components.interfaces.nsiexternalprotocolservice); if (extps.externalprotocolhandlerexists("http")) { // handler for http:// urls exists } link within an iframe to enable a link inside an html document that is the "src" of an iframe to be opened in the default browser, setting the preference: pref("network.protocol-handler.expose-all", false); seems to work.
XULRunner tips - Archive of obsolete content
useful chrome urls most of these require branding.
nsIContentPolicy - Archive of obsolete content
this interface can be very useful if you are developing a content-aware plugin (blocking ads or altering the look of content, for example), or if you want to stop or allow user-browsed urls.
2006-10-20 - Archive of obsolete content
how to create firefox extension (chrome) to add images next to urls ?
Extentsions FAQ - Archive of obsolete content
the ietab (opens ie in a firefox tab) should be able do this if you set it to always open "file://*" urls in an ie tab.
NPN_PostURL - Archive of obsolete content
for http urls only, the browser resolves this method as the http server method post, which transmits data to the server.
Supporting private browsing in plugins - Archive of obsolete content
for example, if private browsing mode is in effect, video player plugins should not record the urls of watched videos in their histories.
XForms Custom Controls - Archive of obsolete content
this also includes content loaded from file:// urls.
XQuery - Archive of obsolete content
xquseme is a working proof-of-concept (so far tested on windows and linux with java installed; mac does not work) extension which allows one to perform xqueries on external urls, the currently loaded webpage (even if originally from poorly formed html), and/or xml (including well-formed xhtml) documents stored locally.
API - MDN Web Docs Glossary: Definitions of Web-related terms
methods, properties, events, and urls) that a developer can use in their apps for interacting with components of a user's web browser, or other software/hardware on the user's computer, or third party websites and services.
Domain name - MDN Web Docs Glossary: Definitions of Web-related terms
domain names are used in urls to identify to which server belong a specific webpage.
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
idl attributes can reflect other types such as unsigned long, urls, booleans, etc.
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
some web applications include a prediction feature completing search text and address bar urls based on browsing history and related searches.
Progressive web apps - MDN Web Docs Glossary: Definitions of Web-related terms
this involves taking standard web sites/apps that enjoy all the best parts of the web — such as discoverability via search engines, being linkable via urls, and working across multiple form factors — and supercharging them with modern apis (such as service workers and push) and features that confer other benefits more commonly attributed to native apps.
Search engine - MDN Web Docs Glossary: Definitions of Web-related terms
the search engine finds the urls of pages that match the query, and ranks them based on their relevance.
Site - MDN Web Docs Glossary: Definitions of Web-related terms
per.mozilla.org/docs/ https://support.mozilla.org/ same site because the registrable domain of mozilla.org is the same http://example.com:8080 https://example.com same site because scheme and port are not relevant examples of different site https://developer.mozilla.org/docs/ https://example.com not same site because the registrable domain of the two urls differs specifications specification status comment url living standard initial definition ...
URI - MDN Web Docs Glossary: Definitions of Web-related terms
the most common are urls, which identify the resource by giving its location on the web.
Styling links - Learn web development
well, if you are writing your html links properly, you should only be using absolute urls for external links — it is more efficient to use relative links to link to other parts of your own site (as with the first link).
How do you host your website on Google App Engine? - Learn web development
the app.yaml file is a configuration file that tells app engine how to map urls to your static files.
How do you upload your files to a web server? - Learn web development
open the filezilla application; you should see something like this: logging in for this example, we'll suppose that our hosting provider (the service that will host our http web server) is a fictitious company "example hosting provider" whose urls look like this: mypersonalwebsite.examplehostingprovider.net.
What is a Domain Name? - Learn web development
prerequisites: first you need to know how the internet works and understand what urls are.
What is a web server? - Learn web development
an http server is software that understands urls (web addresses) and http (the protocol your browser uses to view webpages).
Basic native form controls - Learn web development
note: html5 enhanced the basic original single line text field by adding special values for the type attribute that enforce specific validation constraints and other features, for example specific to entering urls or numbers.
The HTML5 input types - Learn web development
url field a special type of field for entering urls can be created using the value url for the type attribute: <input type="url" id="url" name="url"> it adds special validation constraints to the field.
Images in HTML - Learn web development
note: you should read a quick primer on urls and paths to refresh your memory on relative and absolute urls before continuing.
From object to iframe — other embedding technologies - Learn web development
(in the best case scenario, your user's web browser will give them a scary warning.) all reputable companies that make content available for embedding via an <iframe> will make it available via https — look at the urls inside the <iframe> src attribute when you are embedding content from google maps or youtube, for example.
Choosing the right approach - Learn web development
ffee = fetchanddecode('coffee.jpg', 'blob'); let tea = fetchanddecode('tea.jpg', 'blob'); let description = fetchanddecode('description.txt', 'text'); // use promise.all() to run code only when all three function calls have resolved promise.all([coffee, tea, description]).then(values => { console.log(values); // store each value returned from the promises in separate variables; create object urls from the blobs let objecturl1 = url.createobjecturl(values[0]); let objecturl2 = url.createobjecturl(values[1]); let desctext = values[2]; // display the images in <img> elements let image1 = document.createelement('img'); let image2 = document.createelement('img'); image1.src = objecturl1; image2.src = objecturl2; document.body.appendchild(image1); document.body.appendchild(...
Third-party APIs - Learn web development
this type of api is known as a restful api — instead of getting data using the features of a javascript library like we did with mapquest, we get data by making http requests to specific urls, with data like search terms and other properties encoded in the url (often as url parameters).
Deployment and next steps - Learn web development
to do this, we just remove the leading slashes (/) from the /global.css, /build/bundle.css, and /build/bundle.js urls, like this: <title>svelte to-do list</title> <link rel='icon' type='image/png' href='favicon.png'> <link rel='stylesheet' href='global.css'> <link rel='stylesheet' href='build/bundle.css'> <script defer src='build/bundle.js'></script> do this now.
Introduction to automated testing - Learn web development
you'll find that you can enter urls into the address bar, and use the other controls like you'd expect on a real device.
Reviewer Checklist
privacy issues there should be no logging of urls or content from which urls may be inferred.
Displaying Places information using views
the following example uses the built-in tree view to display bookmarks whose titles or urls contain "mozilla".
Frame script loading and lifetime
chrome: urls extension developers usually use a chrome:// url to refer to the frame scripts.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
note that this doesn't include simple errors due to incorrect urls being entered.
HTTP Cache
represents a distinct storage area (or scope) to put and get cache entries mapped by urls into and from it.
How to get a process dump with Windows Task Manager
(to get a process dump for thunderbird or some other product, substitute the product name where ever you see firefox in these instructions.) caution the memory dump that will be created through this process is a complete snapshot of the state of firefox when you create the file, so it contains urls of active tabs, history information, and possibly even passwords depending on what you are doing when the snapshot is taken.
Addon
screenshots read only addonscreenshot[] an array of addonscreenshot objects containing urls of preview images for the add-on.
Add-on Repository
its api provides urls that can be visited to browse the repository's add-ons.
Creating localizable web content
if there are alternatives, use them by adding the $lang; parameter in the urls evaluate the impact of new pages on all our web properties, especially links to community sites and redirects.
about:memory
00 mb ── canvas-2d-pixels 5.38 mb ── gfx-surface-xlib 0.00 mb ── gfx-textures 0.00 mb ── gfx-tiles-waste 0 ── ghost-windows 109.22 mb ── heap-allocated 164 ── heap-chunks 1.00 mb ── heap-chunksize 114.51 mb ── heap-committed 164.00 mb ── heap-mapped 4.84% ── heap-overhead-ratio 1 ── host-object-urls 0.00 mb ── imagelib-surface-cache 5.27 mb ── js-main-runtime-temporary-peak 0 ── page-faults-hard 203,349 ── page-faults-soft 274.99 mb ── resident 251.47 mb ── resident-unique 1,103.64 mb ── vsize some measurements of note are as follows.
Preference reference
for <selected text>" opening a new tab will give focus to it and load it in the foreground or keep focus on the current tab and open it in the background.browser.urlbar.formatting.enabledthe preference browser.urlbar.formatting.enabled controls whether the domain name including the top level domain is highlighted in the address bar by coloring it black and the other parts grey.browser.urlbar.trimurlsthe preference browser.urlbar.trimurls controls whether the protocol http and the trailing slash behind domain name (if the open page is exactly the domain name) are hidden.dom.event.clipboardevents.enableddom.event.clipboardevents.enabled lets websites get notifications if the user copies, pastes, or cuts something from a web page, and it lets them know which part of the page had been selected.
Midas editor module security preferences
if you want to allow multiple urls to access the paste operation, separate the urls with a space.
NSS 3.12.9 release notes
bug 596798: win_rand.c (among others) uses unsafe _snwprintf bug 597622: do not use the sec_error_bad_info_access_location error code for bad crl distribution point urls bug 619268: memory leaks in cert_changecerttrust and cert_savesmimeprofile bug 585518: addtrust qualified ca root serial wrong in certdata.txt trust entry bug 337433: need cert_findcertbynicknameoremailaddrbyusage bug 592939: expired cas in certdata.txt documentation <for a="" class="new " documentation="" href="/en/index.html#documentation" list="" nss="" of="" pages="" primary="" ...
Rhino shell
note if the shell is invoked with the system property rhino.use_java_policy_security set to true and with a security manager installed, the shell restricts scripts permissions based on their urls according to java policy settings.
Getting SpiderMonkey source code
downloading gzipped spidermonkey source code you can download gzipped spidermonkey source code from the following urls: http://ftp.mozilla.org/pub/spidermonkey/releases/ http://ftp.mozilla.org/pub/spidermonkey/prereleases/ here is a command-line example of downloading and unzipping spidermonkey source code version 59.0: mkdir mozilla cd mozilla wget http://ftp.mozilla.org/pub/spidermonkey/prereleases/59/pre1/mozjs-59.0a1.0.tar.bz2 tar xvf mozjs-59.0a1.0.tar.bz2 these commands should work on most platforms including windows, as long as on windows you are using the mozillabuild bash shell.
JS::CompileOptions
"javascripturl" - code presented in javascript: urls.
Redis Tips
keyspace design here are some things i keep in mind when creating keys: keys are like urls and should read like nice urls keys are like urls with paths separated by a colon, ':' (this is convention only) use a common prefix for all keys in your app (like a domain) be careful about possible name collisions key names should make it obvious what the values are for redis data structures are like program variables; how would you structure your data types in your program?
History Service Design
objectives the primary objectives of the new history service implementation in places are: improve access to browsing history allow association of useful metadata with urls flexible query system for both end-users and add-ons developers clean architecture for ease of code reuse and maintainability the most known and visible feature of history are views.
Querying Places
the result may contain duplicate entries for urls, each with a different date.
Using the Places keywords API
a keyword can only be associated to a given url, it's not possible to associate the same keyword with multiple urls (doing so will just update the url it's pointing to).
Using the Places tagging service
tagginsvc.untaguri(uri("http://example.com/"), ["tag 1"]); //first argument = uri //second argument = array of tag(s) finding all urls with a given tag the nsitaggingservice.geturisfortag() method returns an array of all urls tagged with the given tag.
Components.utils.Sandbox
the following objects are supported: -promise (removed in firefox 37) css indexeddb (web worker only) xmlhttprequest textencoder textdecoder url urlsearchparams atob btoa blob file crypto rtcidentityprovider fetch (added in firefox 41) caches filereader for example: var sandboxscript = 'var encoded = btoa("hello");' + 'var decoded = atob(encoded);'; var options = { "wantglobalproperties": ["atob", "bto...
Components.utils.importGlobalProperties
string/object xpcom component atob blob btoa crypto css fetch file nsidomfile indexeddb nodefilter firefox 60 nsidomnodefilter obsolete since gecko 60 rtcidentityprovider textdecoder textencoder url urlsearchparams xmlhttprequest nsixmlhttprequest obsolete since gecko 60 for string/object in table without a minimum firefox version, it is not exactly known since when it was available, however it is guranteed available from firefox 28 and up.
HOWTO
maybe it even uses javascript files from chrome:// urls.
IAccessibleHyperlink
their anchors would also reference the image object and their anchortargets would reference urls or the objects that would be activated.
mozIJSSubScriptLoader
note: in versions of gecko prior to gecko 1.9, you could use data: urls as well, but this introduced security concerns, and is no longer permitted.
mozIPlacesAutoComplete
behavior_javascript 1 << 6 search javascript: urls.
nsIChromeFrameMessageManager
void loadframescript( in astring aurl, in boolean aallowdelayedload ); parameters aurl the url of the script to load into the frame; this must be an absolute url, but data: urls are supported.
nsIContentPrefService2
domains may be specified either exactly, like "example.com", or as full urls, like "http://example.com/foo/bar".
nsICrashReporter
only https and http urls are allowed, as the submission is handled by os-native networking libraries.
nsIDownloadProgressListener
note: if source and destination are identical, which is possible in case of file urls or chrome urls, this is called even in gecko 1.9.2.
nsIDragDropHandler
navigator the nsiwebnavigation object to handle the dropped urls.
nsIExternalHelperAppService
return value true if data from urls with the specified extension and encoding should be decoded prior to saving the file or delivering it to a helper application; otherwise false.
nsIExternalProtocolService
components.classes["@mozilla.org/network/io-service;1"].getservice(components.interfaces.nsiioservice); var uritoopen = ioservice.newuri("http://www.example.com/", null, null); var extps = components.classes["@mozilla.org/uriloader/external-protocol-service;1"] .getservice(components.interfaces.nsiexternalprotocolservice); if (extps.externalprotocolhandlerexists("tlcxp")) { // handler for http:// urls exists } else { // suppress external-load warning for standard browser schemes pref("network.protocol-handler.external.tlcxp", true); pref("network.protocol-handler.app.tlcxp, "lzx"); } </pre> getprotocolhandlerinfo() retrieve the handler for the given protocol.
nsIExternalURLHandlerService
uriloader/exthandler/nsiexternalurlhandlerservice.idlscriptable the external url handler service is used for finding platform-specific applications for handling particular urls.
nsIFilePicker
filterallowurls 0x80 allow urls.
nsIFileURL
the url scheme need not be file:, since other local protocols may map urls to files (e.g., resource:).
nsIFrameScriptLoader
data: urls are also supported.
nsIHTMLEditor
void setparagraphformat( in astring aparagraphformat ); parameters aparagraphformat "p", "h1" to "h6", "address", "pre", or "blockquote" updatebaseurl() set the baseurl for the document to the current url but only if the page doesn't have a <base> tag this should be done after the document url has changed, such as after saving a file this is used as base for relativizing link and image urls.
nsIMsgIncomingServer
used to construct urls.
nsINavHistoryResultNode
for visits and urls, this is the url of the page.
nsIParserUtils
sanitizercidembedsonly (1 << 2) flag for sanitizer: only allow cid: urls for embedded content.
nsIProcessScriptLoader
data: urls are also supported.
nsIProtocolHandler
see also nsiproxiedprotocolhandler adding a new protocol to mozilla writing a firefox protocol handler custom about: urls - similar to adding new protocol but adding onto the existing about: protocol ...
nsIProtocolProxyService
if a nsiprotocolhandler disallows all proxying, then filters will never have a chance to intercept proxy requests for such urls.
nsISearchEngine
responsetype since an engine can have several different request urls, differentiated by response types, this parameter selects a request to add parameters to.
nsIStandardURL
it supports initialization from a relative path and provides some customization on how urls are normalized.
nsIStringBundleService
to access this service, use: var stringbundleservice = components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistringbundleservice); method overview nsistringbundle createbundle(in string aurlspec); nsistringbundle createextensiblebundle(in string aregistrykey); void flushbundles(); wstring formatstatusmessage(in nsresult astatus, in wstring astatusarg); methods createbundle() nsistringbundle createbundle( in string aurlspec ); parameters aurlspec the url of the properties file to load.
nsIURLFormatter
mozilla applications linking to mozilla websites are strongly encouraged to use urls of the following format: http[s]://%service%.mozilla.[com|org]/%locale%/ method overview astring formaturl(in astring aformat); astring formaturlpref(in astring apref); methods formaturl() formats a string url.
nsIURLParser
this makes urls with semicolons in them work correctly.
nsIWebNavigation
for http and ftp urls and possibly others, characters above u+007f will be converted to utf-8 and then url- escaped per the rules of rfc 2396.
Using the clipboard
for other types of data, such as urls or images, you will need to use a more complex method.
Autoconfiguration in Thunderbird
configuration server at isp given the email address "fred@example.com", thunderbird checks <https://autoconfig.example.com/mail/config-v1.1.xml?emailaddress=fred@example.com> (preferred) and <https://example.com/.well-known/autoconfig/mail/config-v1.1.xml> and the same urls with http (see section ssl below).
nsIMsgCloudFileProvider
this function translates those error codes into those urls.
Index
this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
MailNews Filters
for imap, we tend to initiate the urls synchronously, but because we don't run two urls simultaneously on the same folder, the urls don't run until we've finished downloading headers.
Mail composition back end
const struct nsmsgattachmentdata *attachments, - subsequent attachments are provided as urls to load, described in the nsmsgattachmentdata structures.
Mailbox
this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
Virtualenv
here are a few such tools: carton: make a self-extracting virtualenv from directories or urls of packages; http://pypi.python.org/pypi/carton velcro: a script that sets up a python project for local installation; https://bitbucket.org/kumar303/velcro/ virtualenvwrapper: a set of extensions to ian bicking’s virtualenv tool for creating isolated python development environments; http://www.doughellmann.com/projects...tualenvwrapper the mozilla-central virtualenv in order to make ...
Zombie compartments
(http://www.facebook.com/plugins/like.php?...) compartment(https://plusone.google.com/_/+1/fastbutton?...) compartment(http://platform.twitter.com/widgets/...utton.html?...) compartment(http://cdn.at.atwola.com/_media/uac/tcode3.html) compartment(https://s-static.ak.fbcdn.net/connec..._proxy.php?...) compartment(http://ads.tw.adsonar.com/adserving/getads.jsp?...) (some of those compartment urls are long and have been truncated.) another thing to beware is each compartment is created for an origin (e.g.
Mozilla
adding phishing protection data providers phishing protection technology lets firefox help protect users by comparing the urls the user visits to a list of known scam sites, and presenting a warning to the user when they visit a site on the list.
Streams - Plugins
streams are objects that represent urls and the data they contain, or data sent by a plug-in without an associated url.
Introduction to DOM Inspector - Firefox Developer Tools
inspecting arbitrary urls you may also inspect the dom of arbitrary urls by using the inspect a url menuitem in the file menu, or by just entering a url into the dom inspector's address bar and clicking inspect or pressing enter.
Debugger.Source - Firefox Developer Tools
"javascripturl", for code presented in javascript: urls.
Web Console Helpers - Firefox Developer Tools
:unblock (starting in firefox 80) followed by an unquoted string, removes blocking for urls containing that string.
Cache.keys() - Web APIs
WebAPICachekeys
note: requests with duplicate urls but different headers can be returned if their responses have the vary header set on them.
Cache - Web APIs
WebAPICache
cache.addall(requests) takes an array of urls, retrieves them, and adds the resulting response objects to the given cache.
FetchEvent.respondWith() - Web APIs
if a worker script is intercepted, then the final url is used to set self.location and used as the base url for relative urls in the worker script.
Using Fetch - Web APIs
a body is an instance of any of the following types: arraybuffer arraybufferview (uint8array and friends) blob/file string urlsearchparams formdata the body mixin defines the following methods to extract a body (implemented by both request and response).
FormData - Web APIs
WebAPIFormData
you can also pass it directly to the urlsearchparams constructor if you want to generate query parameters in the way a <form> would do if it were using simple get submission.
HTMLBaseElement - Web APIs
htmlbaseelement.href is a domstring that reflects the href html attribute, containing a base url for relative urls in the document.
HTMLHyperlinkElementUtils - Web APIs
these utilities allow to deal with common features like urls.
Drag Operations - Web APIs
as the name implies, the text/uri-list type actually may contain a list of urls, each on a separate line.
Location - Web APIs
WebAPILocation
modern browsers provide urlsearchparams and url.searchparams to make it easy to parse out the parameters from the querystring.
Navigator.registerProtocolHandler() - Web APIs
for example, this api lets webmail sites open mailto: urls, or voip sites open tel: urls.
Navigator.sendBeacon() - Web APIs
data a arraybuffer, arraybufferview, blob, domstring, formdata, or urlsearchparams object containing the data to send.
PasswordCredential - Web APIs
passwordcredential.additionaldata secure context one of a formdata instance, a urlsearchparams instance, or null.
Payment processing concepts - Web APIs
url-based payment method identifiers these may vary substantially depending on the specifics of the service, and a given processing service may have multiple urls used, depending on the version of their api, their communication technology, and so forth.
PushManager - Web APIs
the pushmanager interface of the push api provides a way to receive notifications from third-party servers as well as request urls for push notifications.
Push API - Web APIs
WebAPIPush API
pushmanager provides a way to receive notifications from third-party servers, as well as request urls for push notifications.
RTCConfiguration.bundlePolicy - Web APIs
let config = { iceservers: [ { urls: [ "stun:stun.example.com" ] }, ], bundlepolicy: "max-compat" }; let pc = new rtcpeerconnection(config); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcconfiguration.bundlepolicy' in that specification.
RTCConfiguration.iceTransportPolicy - Web APIs
let config = { iceservers: [ { urls: [ "stun:stun.example.com" ] }, ], icetransportpolicy: "relay" }; let pc = new rtcpeerconnection(config); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtccandidate.icetransportpolicy' in that specification.
RTCIceCandidate.address - Web APIs
to do this, configure the ice agent's ice transport policy using rtcconfiguration, like this: var rtcconfig = { iceservers: [ { urls: "turn:myturn.server.ip", username: "username", credential: "password" } ], icetransportpolicy: "relay" } by setting rtcconfiguration.icetransportpolicy to "relay", any host candidates (candidates where the ip address is the peer's own ip address) are left out of the pool of candidates, as are any other candidates which aren't relay candidates.
RTCIceServer.credential - Web APIs
mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.credential' in that specification.
RTCIceServer.credentialType - Web APIs
mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword", credentialtype: "password" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.credential' in that specification.
RTCIceServer.username - Web APIs
mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.username' in that specification.
RTCPeerConnection: track event - Web APIs
pc = new rtcpeerconnection({ iceservers: [ { urls: "turn:fake.turnserver.url", username: "someusername", credential: "somepassword" } ] }); pc.addeventlistener("track", e => { videoelement.srcobject = e.streams[0]; hangupbutton.disabled = false; }, false); the event handler assigns the new track's first stream to an existing <video> element, identified using the variable videoelement.
Request() - Web APIs
WebAPIRequestRequest
body: any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readablestream object.
Request - Web APIs
WebAPIRequest
uest() constructor with some initial data and body content for an api request which need a body payload: const request = new request('https://example.com', {method: 'post', body: '{"foo": "bar"}'}); const url = request.url; const method = request.method; const credentials = request.credentials; const bodyused = request.bodyused; note: the body type can only be a blob, buffersource, formdata, urlsearchparams, usvstring or readablestream type, so for adding a json object to the payload you need to stringify that object.
Response() - Web APIs
WebAPIResponseResponse
this can be null (which is the default value), or one of: blob buffersource formdata readablestream urlsearchparams usvstring init optional an options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value).
Response.clone() - Web APIs
WebAPIResponseclone
when the fetch resolves successfully, we clone it, extract a blob from both responses using two body.blob calls, create object urls out of the blobs using url.createobjecturl, and display them in two separate <img> elements.
SVGAElement - Web APIs
svgaelement.ping is a domstring that reflects the ping attribute, containing a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the browser (in the background).
ServiceWorkerContainer.register() - Web APIs
currently available options are: scope: a usvstring representing a url that defines a service worker's registration scope; that is, what range of urls a service worker can control.
Using Service Workers - Web APIs
this returns a promise for a created cache; once resolved, we then call a function that calls addall() on the created cache, which for its parameter takes an array of origin-relative urls to all the resources you want to cache.
Service Worker API - Web APIs
if successful, your service worker will be downloaded to the client and attempt installation/activation (see below) for urls accessed by the user inside the whole origin, or inside a subset specified by you.
URL.href - Web APIs
WebAPIURLhref
syntax const urlstring = url.href url.href = newurlstring value a usvstring.
URL.revokeObjectURL() - Web APIs
examples see using object urls to display images.
Using textures in WebGL - Web APIs
because webgl now requires textures to be loaded from secure contexts, you can't use textures loaded from file:/// urls in webgl.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
const constraints = { audio: true, video: true }; const config = { iceservers: [{ urls: "stun:stun.mystunserver.tld" }] }; const selfvideo = document.queryselector("video.selfview"); const remotevideo = document.queryselector("video.remoteview"); const signaler = new signalingchannel(); const pc = new rtcpeerconnection(config); this code also gets the <video> elements using the classes "selfview" and "remoteview"; these will contain, respectively, the local user's self-view and...
Improving compatibility using WebRTC adapter.js - Web APIs
for example, on firefox versions older than 38, the adapter adds the rtcpeerconnection.urls property; firefox doesn't natively support this property until firefox 38, while on chrome, the adapter adds support for the promise based api is added if it's not present.
Window.history - Web APIs
WebAPIWindowhistory
for security reasons the history object doesn't allow the non-privileged code to access the urls of other pages in the session history, but it does allow it to navigate the session history.
Window: popstate event - Web APIs
if the original and new entry's shared the same document, but had different fragments in their urls, send the hashchange event to the window.
WindowOrWorkerGlobalScope.fetch() - Web APIs
body any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readablestream object.
Worker - Web APIs
WebAPIWorker
this also works for blob urls.
Using XMLHttpRequest - Web APIs
you can automatically adjust urls using the following code: var oreq = new xmlhttprequest(); oreq.open("get", url + ((/\?/).test(url) ?
XMLHttpRequest.open() - Web APIs
ignored for non-http(s) urls.
XMLHttpRequest.responseXML - Web APIs
responsexml is null for any other types of data, as well as for data: urls.
XMLHttpRequest.send() - Web APIs
an xmlhttprequestbodyinit, which per the fetch spec can be a blob, buffersource, formdata, urlsearchparams, or usvstring object.
Web APIs
WebAPI
tymapreadonly stylesheet stylesheetlist submitevent subtlecrypto syncevent syncmanager t taskattributiontiming text textdecoder textencoder textmetrics textrange texttrack texttrackcue texttracklist timeevent timeranges touch touchevent touchlist trackdefault trackdefaultlist trackevent transferable transformstream transitionevent treewalker typeinfo u uievent ulongrange url urlsearchparams urlutilsreadonly usb usbalternateinterface usbconfiguration usbdevice usbendpoint usbintransferresult usbinterface usbisochronousintransferpacket usbisochronousintransferresult usbisochronousouttransferpacket usbisochronousouttransferresult usbouttransferresult usvstring userdatahandler userproximityevent v vttcue vttregion validitystate videoconfiguration vide...
src - CSS: Cascading Style Sheets
WebCSS@font-facesrc
as with other urls in css, the url may be relative, in which case it is resolved relative to the location of the style sheet containing the @font-face rule.
Using URL values for the cursor property - CSS: Cascading Style Sheets
syntax the basic (css 2.1) syntax for this property is: cursor: [ <url> , ]* <keyword> this means that zero or more urls may be specified (comma-separated), which must be followed by one of the keywords defined in the css specification, such as auto or pointer.
CSS Images - CSS: Cascading Style Sheets
css images is a module of css that defines what types of images can be used (the <image> type, containing urls, gradients and other types of images), how to resize them and how they, and other replaced content, interact with the different layout models.
CSS values and units - CSS: Cascading Style Sheets
urls a <url> type uses functional notation, which accepts a <string> that is a url.
shape-outside - CSS: Cascading Style Sheets
note: user agents must use the potentially cors-enabled fetch method defined by the html5 specification for all urls in a shape-outside value.
Getting Started - Developer guides
as a security feature, you cannot call urls on 3rd-party domains by default.
Live streaming web audio and video - Developer guides
note: shoutcast urls may require a semi-colon to be appended to them.
<area> - HTML: Hypertext Markup Language
WebHTMLElementarea
ping contains a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the browser (in the background).
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
element description <base> the html <base> element specifies the base url to use for all relative urls in a document.
inputmode - HTML: Hypertext Markup Language
url a keypad optimized for entering urls.
itemprop - HTML: Hypertext Markup Language
note: the rules above disallow ":" characters in non-url values because otherwise they could not be distinguished from urls.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
65 <base>: the document base url element element, html, html document metadata, html:metadata content, reference the html <base> element specifies the base url to use for all relative urls in a document.
Reason: CORS request not HTTP - HTTP
to fix this problem, simply make sure you use https urls when issuing requests involving cors, such as xmlhttprequest, fetch apis, web fonts (@font-face), and webgl textures, and xsl stylesheets.
Using HTTP cookies - HTTP
WebHTTPCookies
here is an example: set-cookie: id=a3fwa; expires=wed, 21 oct 2021 07:28:00 gmt; secure; httponly define where cookies are sent the domain and path attributes define the scope of the cookie: what urls the cookies should be sent to.
Content-Location - HTTP
if the url for a particular document is at https://example.com/documents/foo, the site could return different urls for content-location depending on the request's accept header: request header response header accept: application/json, text/json content-location: /documents/foo.json accept: application/xml, text/xml content-location: /documents/foo.xml accept: text/plain, text/* content-location: /documents/foo.txt these urls are examples — the site...
CSP: frame-ancestors - HTTP
'none' refers to the empty set; that is, no urls match.
Referrer-Policy - HTTP
this policy will leak potentially-private information from https resource urls to insecure origins.
X-DNS-Prefetch-Control - HTTP
the x-dns-prefetch-control http response header controls dns prefetching, a feature by which browsers proactively perform domain name resolution on both links that the user may choose to follow as well as urls for items referenced by the document, including images, css, javascript, and so forth.
HTTP headers - HTTP
WebHTTPHeaders
x-dns-prefetch-control controls dns prefetching, a feature by which browsers proactively perform domain name resolution on both links that the user may choose to follow as well as urls for items referenced by the document, including images, css, javascript, and so forth.
RegExp - JavaScript
extracting sub-domain name from url let url = 'http://xxx.domain.com' console.log(/[^.]+/.exec(url)[0].substr(7)) // logs 'xxx' instead of using regular expressions for parsing urls, it is usually better to use the browsers built-in url parser by using the url api.
encodeURI() - JavaScript
s to encode a surrogate which is not part of a high-low pair, e.g., // high-low pair ok console.log(encodeuri('\ud800\udfff')); // lone high surrogate throws "urierror: malformed uri sequence" console.log(encodeuri('\ud800')); // lone low surrogate throws "urierror: malformed uri sequence" console.log(encodeuri('\udfff')); encoding for ipv6 if one wishes to follow the more recent rfc3986 for urls, which makes square brackets reserved (for ipv6) and thus not encoded when forming something which could be part of a url (such as a host), the following code snippet may help: function fixedencodeuri(str) { return encodeuri(str).replace(/%5b/g, '[').replace(/%5d/g, ']'); } specifications specification ecmascript (ecma-262)the definition of 'encodeuri' in that specifi...
serviceworker - Web app manifests
scope a string representing a url that defines a service worker's registration scope; that is, what range of urls a service worker can control.
How to make PWAs installable - Progressive web apps (PWAs)
icons: a bunch of icon information — source urls, sizes, and types.
requiredExtensions - SVG: Scalable Vector Graphics
candidate recommendation iris replaced with urls scalable vector graphics (svg) 1.1 (second edition)the definition of 'requiredextensions' in that specification.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
implicit box transformation to show nearest ancestor <svg> element implementation status unknown unspecified svg view fragment parameters don't cause corresponding attributes to be reset to initial values implementation status unknown viewtarget attribute of <view> and corresponding svg view fragment parameter removed implementation status unknown fragment-only urls are always same-document implementation status unknown additional attributes on <a> implemented (bug 1451823) scripting change notes contentscripttype removed implementation status unknown animationevents.onload removed implementation status unknown fonts change notes <font>, <glyph>, <missing-glyph>, ...
XPath
xpath uses a path notation (as in urls) for navigating through the hierarchical structure of an xml document.