What’s different between URI, request-URI and URL?

The URI standard is STD 66, which currently maps to RFC 3986. URI vs. URL Section 1.1.3 describes the difference between URIs and URLs (and URNs). Components Section 3 describes the components a URI can have. For the URI http://www.example.org:56789/a/b/c.txt?t=win&s=chess#para5 these would be: Scheme: http Authority: www.example.org:56789 User Information: not present Host: www.example.org Port: 56789 Path: /a/b/c.txt Query: t=win&s=chess Fragment: para5 request-URI The term “request-URI” is not defined … Read more

The origin on why ‘%20’ is used as a space in URLs

It’s called percent encoding. Some characters can’t be in a URI (for example #, as it denotes the URL fragment), so they are represented with characters that can be (# becomes %23) Here’s an excerpt from that same article: When a character from the reserved set (a “reserved character”) has special meaning (a “reserved purpose”) in a certain context, … Read more

How to load script with jquery.load()?

When you say “the script doesn’t work” do you mean there’s javascript in the page you’re loading through ajax? It’s not going to work, ever, at least not directly. You have two choices. Parse out the script from the content you’ve loaded, and use eval to run it. A better way is to use $.getScript to load (and execute) … Read more

Custom Tumblr theme wont save because of non-https urls?

Just had the same problem. Tumblr updated their Encryption policies. If you’re a theme developer and you’d like to ensure your themes support HTTPS, make sure that any externally hosted resources, such as Cascading Style Sheets (CSS) or Javascript files, and even images, are served using HTTPS. As we now know that Tumblr requires that we … Read more

How can I get query string values in JavaScript?

Update: June-2021 For a specific case when you need all query params: Update: Sep-2018 You can use URLSearchParams which is simple and has decent (but not complete) browser support. Original You don’t need jQuery for that purpose. You can use just some pure JavaScript: Usage: NOTE: If a parameter is present several times (?foo=lorem&foo=ipsum), you will get the … Read more

Get the values from the “GET” parameters (JavaScript)

JavaScript itself has nothing built in for handling query string parameters. Code running in a (modern) browser you can use the URL object (which is part of the APIs provided by browsers to JS):  Run code snippetExpand snippet For older browsers (including Internet Explorer), you can use this polyfill or the code from the original version of this answer that predates URL: You … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)