Questions tagged [url]

A URL (Uniform Resource Locator), is a universal identifier on the web. A URL is a reference to a web resource at a specific location, and provides a means for retrieving that resource.

The syntax and parsing behavior for URLs is defined in the URL Living Standard web page - this is the current URL standard.

Basically URL has 3 parts:

  • the URL prefix, which specifies the protocol used to access the location
  • the server name or IP address of the server
  • the path to the directory or file(resource)

References

Related tags

43477 questions
6037
votes
34 answers

How do I change the URI (URL) for a remote Git repository?

I have a repo (origin) on a USB key that I cloned on my hard drive (local). I moved "origin" to a NAS and successfully tested cloning it from here. I would like to know if I can change the URI of "origin" in the settings of "local" so it will now…
Bite code
  • 578,959
  • 113
  • 301
  • 329
5642
votes
18 answers

What is the maximum length of a URL in different browsers?

What is the maximum length of a URL for each browser? Is a maximum URL length part of the HTTP specification?
Sander Versluys
  • 72,737
  • 23
  • 84
  • 91
4912
votes
31 answers

What is the difference between a URI, a URL, and a URN?

What is the difference between a URL, a URI, and a URN?
Sean McMains
  • 57,907
  • 13
  • 47
  • 54
3694
votes
26 answers

Get the current URL with JavaScript?

All I want is to get the website URL. Not the URL as taken from a link. On the page loading I need to be able to grab the full, current URL of the website and set it as a variable to do with as I please.
dougoftheabaci
2978
votes
21 answers

How do I modify the URL without reloading the page?

Is there a way I can modify the URL of the current page without reloading the page? I would like to access the portion before the # hash if possible. I only need to change the portion after the domain, so it's not like I'm violating cross-domain…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
2860
votes
22 answers

Encode URL in JavaScript

How do you safely encode a URL using JavaScript such that it can be put into a GET string? var myUrl = "http://example.com/index.html?param=1&anotherParam=2"; var myOtherUrl = "http://example.com/index.html?url=" + myUrl; I assume that you need to…
nickf
  • 537,072
  • 198
  • 649
  • 721
2694
votes
73 answers

How can I get query string values in JavaScript?

Is there a plugin-less way of retrieving query string values via jQuery (or without)? If so, how? If not, is there a plugin which can do so?
Subliminal Hash
  • 13,614
  • 20
  • 73
  • 104
2073
votes
41 answers

How to lazy load images in ListView in Android

I am using a ListView to display some images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load images so while the text displays, the UI is not blocked and images are displayed as they…
lostInTransit
  • 70,519
  • 61
  • 198
  • 274
2033
votes
31 answers

Get current URL with jQuery?

I am using jQuery. How do I get the path of the current URL and assign it to a variable? Example URL: http://localhost/menuname.de?foo=bar&number=0
venkatachalam
  • 102,353
  • 31
  • 72
  • 77
1714
votes
63 answers

Get the values from the "GET" parameters (JavaScript)

I have a URL with some GET parameters as follows: www.test.com/t.html?a=1&b=3&c=m2-m3-m4-m5 I need to get the whole value of c. I tried to read the URL, but I got only m2. How do I do this using JavaScript?
joe
  • 34,529
  • 29
  • 100
  • 137
1600
votes
43 answers

How can I open a URL in Android's web browser from my application?

How to open an URL from code in the built-in web browser rather than within my application? I tried this: try { Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(download_link)); startActivity(myIntent); } catch…
Arutha
  • 26,088
  • 26
  • 67
  • 80
1488
votes
42 answers

Path.Combine for URLs?

Path.Combine is handy, but is there a similar function in the .NET framework for URLs? I'm looking for syntax like this: Url.Combine("http://MyUrl.com/", "/Images/Image.jpg") which would return: "http://MyUrl.com/Images/Image.jpg"
Brian MacKay
  • 31,133
  • 17
  • 86
  • 125
1227
votes
59 answers

React-router URLs don't work when refreshing or writing manually

I'm using React-router and it works fine while I'm clicking on link buttons, but when I refresh my webpage it does not load what I want. For instance, I am in localhost/joblist and everything is fine because I arrived here pressing a link. But if I…
DavidDev
  • 12,605
  • 4
  • 14
  • 15
1122
votes
33 answers

How do I get the current absolute URL in Ruby on Rails?

How can I get the current absolute URL in my Ruby on Rails view? The request.request_uri only returns the relative URL.
Jakub Arnold
  • 85,596
  • 89
  • 230
  • 327
1031
votes
64 answers

What is the best regular expression to check if a string is a valid URL?

How can I check if a given string is a valid URL address? My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.
Vitor Silva
  • 17,114
  • 8
  • 33
  • 27
1
2 3
99 100