ExtJS 6: Parse url paramaters from rest pathname - extjs6

Is there a inbuilt library in ExtJS v6 or v7 that could help in parsing rest style url pathname. For example a pathname "/abc/123/def/456/geh" should return `{ abc_id: 123, id: 456 }

No, because REST-style URLs are for web services, not single-page apps (SPA). A SPA is intended to be represented by a single URL. If you try to use REST-style URLs, the browser will reload the page, restarting the app.
Navigation within that URL can be done via routes (done in the anchor portion of the URL, after the #). For more information on using routes, check the documentation.

Related

How detailed should my sitemap be for a multilingual site?

I have a one page website which includes an English main page, and a French Main Page. One can access my website through the following URLs:
ENGLISH VERSION OF MAIN PAGE
www.example.org
www.example.org/index.html
example.org
example.org/index.html
FRENCH VERSION OF MAIN PAGE
www.example.org/fr
www.example.org/fr/index.html
example.org/fr
example.org/fr/index.html
For optimal search engine indexing, should I include all of these URLs in my sitemap (with both http:// and https://)? If not, what would be the set of URLs I should include in my sitemap.xml file?
You should include all unique pages in your sitemap once.
All of the different URLs you listed are just different ways of accessing the same page/content, just like most PHP applications can be accessed via site.org/ or site.org/index.php. Your sitemap should include just one reference to a page.
The best practice is to have one canonical URL per document. And each canonical URL should be added to your sitemap (if you have one).
So in your case you may want to use one URL for the English main page and one URL for the French main page, and redirect (with HTTP status code 301) from the other URLs to the canonical ones. In addition, you can declare the canonical URL with the canonical link relation.
If you need to provide HTTP in addition to HTTPS (instead of enforcing HTTPS), you would of course need to have two URLs per document (one with HTTP, one with HTTPS). But you [should only list one variant in the sitemap](http://www.sitemaps.org/faq.html#faq_http_vs_https "Sitemaps.org FAQ: 'My site has both "http" and "https" versions of URLs. Do I need to list both?'"), and you should only declare one as canonical (ideally the same which you added to the sitemap).
Which URLs to choose can depend on various factors (usability, SEO, your backend, …), but it seems safe to assume that index.html is ballast. You’d have to decide if to use the www subdomain (a common convention) or not. Assuming that you choose to omit it, you could have these canonical URLs:
https://example.org/
https://example.org/fr
And you would redirect the following URLs with 301 to the canonical URLs listed above:
https://example.org/index.html
https://www.example.org/
https://www.example.org/index.html
https://example.org/fr/index.html
https://www.example.org/fr
https://www.example.org/fr/index.html

Rich Snippets - sitename in search (canonical website URL)

Using the example from Google structured data docs, I've added the Website Microdata to my site.
What bothers me is the description of the url prop:
url = the URL of your official website (required)
Does official website mean the base URL of my website or the URL of the current requested page?
I know only that it is not a good practice to have same canonical URL on two different pages and the above description really confuse me.
For the WebSite type, the value of the url property would be the URL that represents the whole website. This is typically the URL of the homepage.
(And for the WebPage type, it would be the URL of that webpage.)

Symfony2 Twig url() https

I need to generate an absolute URL that will use the secure HTTP protocol since it's a payment page template used by a third party payment gateway solution that requires every single element on the page to point to or to come from an HTTPS link. Now, I can't for the life of me find how to use the Twig url() function to generate a secure URL. Anything you add to the function in an array is considered a GET parameter that will be appended at the end of the URL in a ?x=y manner.
How can I generate an HTTPS URL using the Twig url() function???
Thanks in advance.
The URLs generated by twig are determined by your routing configuration. You need to set the route to require https.
requirements:
_scheme: https
You can read more about it here:
http://symfony.com/doc/2.0/cookbook/routing/scheme.html

url structure for mobile/desktop site

What are the pros and cons of these url formats for a website that does mobile and desktop content...
mobile.example.com
example.com/mobile
no explicit url, but send back dynamic content based on browser, or querystring variable?
thanks
W3 recommends "When accessing site entry points users should not have to enter a filename as part of the URI. If possible, configure Web sites so that they can be accessed without having to specify a sub-domain as part of the URI."
So m.example.com or example.com/m would be best solution

How to Force Bots/Apps to use your URL Shortener

I've used several Twitter apps and they all seem to shorten URLs using the website's own URL shortener instead of bit.ly or tinyurl.com or something. For instance, Amazon's is amzn.to. Is it that these apps are really keeping up with the most popular sites (Amazon, Dell, ESPN, Microsoft, Google, Apple, etc) or is there a metatag, javascript, or something else that I can add to my web application to have it use a custom URL shortener? We have one that we've used forever as our domain name is over 20 characters in length.
Basically, apps that are supporting bit.ly and other URL shorteners can tell who you are and thus shorten the URL appropriately using a custom domain.

Resources