I'm thinking about doing a mobile version of our website. Some people says it's a good idea to let mobile websites have their own domain name (ie m.domainname.com) as oppose to the same app handling both mobile and desktop requests. What are some pros and cons of these two approaches?
My technology stack is ASP.NET MVC2 + MySQL.
This is more a strategic issue for your business. A lot of the larger vendors seem to use a suffix because it allows the end browser to be sure it is viewing the correct version of the site.
So for example, if I am using my smartphone to view a site - sometimes I will be redirected to the subdomain because there is code that determines through the session exactly what browser (and version) I am running. The redirect will then cause me to go to the new site. A problem arises when a situation arises that the code wasn't written to deal with. If I connected with a bespoke browser - how would the site determine that I was on a smartphone? Sure there is additional metadata that can be gathered - but what happens if my bespoke browse purposefully conceals that information (perhaps because it is not designed to view general web pages)?
The subdomain prefix gives the consumer a choice. They can view the normal site in their smartphone - and risk that the web pages may render incorrectly, etc.. Or alternatively they can enter the subdomain and view the site using the correct CSS for a smaller screen, alternatives to flash, and other technologies that smartphones require to view a site correctly.
If you want to play it safe - use the subdomain approach like we do. The big companies all seem to adapt this approach so why try to go against the grain. Remember - 99.99% of development is just doing something someone else has done before you (more or less) so learn from their mistakes.
Related
I noticed a lot of shady websites use ads with multiple redirects before showing the content of the ad.
I do not want to link to any of these (propably) illegal content distribution sites, but this effect is easily found when browsing through streaming sites for TV series and stuff like that.
Basically, it works like this:
User interaction (mostly click) opens popup
popup shows firstdomain.com without content
redirects to seconddomain.com
redirects to thirddomain.com
...
finally shows the ad, often a legit one, but this varies from sports betting to adult social media
Is there any upside to these multiple redirects? And why are they set up this way?
You're likely to be thrown from one TDS to another
A TDS is a web based gate that is able to redirect users to various
content depending on who they are. A TDS is able to make a decision on
where to send a user based on criteria such as their geo-location,
browser, operating system, and whether or not they have been sent the
malicious content already. There are many legitimate uses of TDSes,
but there are also specific TDSes (Sutra, BlackOS, NinjaTDS etc.)
written for malware actors
Also from here:
As discussed above, TDS are not malicious elements per se within the
Internet ecosystem, as they are very useful for the operation of
e-commerce and online marketing, but also constitute a good malware
distribution platform.
...
To avoid detection and make it difficult to track these downloads, it
is possible to link several TDSs between them
I recently read an article, "www. is not deprecated", which strongly advices against redirection from www to no-www. I would like to know the main cons of such a redirection and the main cons of redirecting from no-www to www. How would it impact site scalability, search engines visibility, problems with cookies, etc.
I'm going to suggest something controversial. It doesn't matter. Use either domain.
There are legitimate issues with serving content from a single domain with HTTP 1.1. You have to do domain sharding in order to parallelize content. However browsers only open up 4 connections at the same time, so even that scaling is limited. This is called sharding.
However the issues of sharding are gone with HTTP/2. With HTTP/2 you can parallize assets natively over a single connection. https://http2.github.io/faq/
When you need to scale beyond a single server you'll be faced with other issues, but throwing more hardware at the problem will be the easiest solution. When your site becomes so large you'll want to use a Content Delivery Network at which point, scaling becomes a non-issue for the front end.
There are issues with cross domain cookies. If you do scale to such a large size that you need a single sign on solution, you won't be worried about sub domain cookies, you'll probably be looking at a single sign on service, such as facebook, google, openid, or you'll roll your own saml2.0 solution, a CDN will also be able to provide a solution to do cross domain cookies as well.
Someone else can speak to authority regarding SEO.
Build your site the way you find aesthetically pleasing, and deal with the scaling issues when you come to them.
Edit: I did think of one advantage of using www.example.com You can cname www, whereas you would not be able to cname the example.com.
Since the article covers the reasons for www domain, I'll not repeat that and look at other side instead:
It's mostly aesthetic - some people think a bare domain looks better.
The www isn't needed and some think is a relic of the past - who even differentiates between the World Wide Web and the Internet anymore? Certainly not your browser which is more concerned with the protocol (http/https) than three random letters tacked on to the beginning of a website domain.
And finally it's extra typing for the user, or speaking - www is actually quite a mouthful when reading out a web address, and don't even come near me with the "dub dub dub" phrasing that some try to use to address this.
Personally I still think www wins it for me - mostly from recognition factor rather than from the technical issues raised in the article (though they help cement this opinion). In the same way that a .com or .country domain is more recognisable as a web address than some of the new TLDs.
Using a subdomain in your website address (of which www is the most recognisable) does have technical advantages as raised in the article - some of which can be worked around - but other than those it's a personal preference so not sure that SO is best place for this since there is no "right" answer.
One thing is clear. You should have one domain variant and stick with it. So redirect to your preferred version (with or without www) so if anyone ends up on the wrong one they are steered right. This just makes sense from a cleanliness point of view and also from an SEO point of view since search engines see the two domains as separate and so you don't want content showing on both as duplicate. Along the same vein, it's best practice to have your webserver listen to both domains to do that redirect and, if using https, to make sure your certificate covers both domains.
was wondering if anyone had a solution (hopefully simple) for how to change the repository that a SAPUI5 app pulls from.
i.e. when I'm accessing my app (might be hosted anywhere, but for argument's sake lets say on HCP in EU) and I'm in the EU, it makes sense to use the EU repository:
https://sapui5.hana.ondemand.com/resources/sap-ui-cachebuster/sap-ui-core.js
when in the US however, I'm going to get much better performance if I use the US repository:
https://sapui5.us1.hana.ondemand.com/resources/sap-ui-cachebuster/sap-ui-core.js
But short of having a US app and a EU app, how can I achieve this? I don't want to pop-up a request for the user to allow their browser to know where they are via using HTML Geo capabilities http://dev.w3.org/geo/api/spec-source.html and it seems most solutions to map IP addresses to location charge a fee (which I don't want to have to pay)
The standard way for this sort of thing on the web (afaik) would be just to use one address and have a CDN sort it out for you.
This doesn't seem to have happened for SAPUI5.
Anyone know why not? Or perhaps it has, and I just don't know about it, that would also be a very happily received answer.
Now, as of January 2015 there is such a CDN (with geo routing) implemented for OpenUI5 (or more specifically, for everything below the URL https://openui5.hana.ondemand.com).
It does not only serve the data from the closest SAP data center (Germany, USA, Australia), but uses the popular Akamai CDN technology on top, which provides thousands of servers around the world.
See http://openui5.tumblr.com/post/108835000027/openui5-in-your-neighborhood-a-true-cdn-has-gone for more details.
there is currently no such CDN with automatic routing to the closest server, sorry.
Reasons? Lack of time, money, demand...
There may be even free offerings for Open Source libs, but the total of UI5 is larger than your typical JS lib, so I'm not sure they would want it. And in older IE versions the cross-domain loading wasn't working anyway due to missing CORS support, hence a local deployment was preferred. And custom-tailored minimized runtimes for apps are the best for good performance, this is also not something a CDN can deliver. So currently there is no such thing even though it would be obviously good to have.
UI5 will load awesome fast if is part of a real app. Real app means a installable app from an App Store were the UI5 library is part of the app itself and not loaded from a server. That is the real destiny of UI5 and not putting it on a Gateway/Server (the Fiori Way, although there is the Fiori Client which tries to solve this).
I understand that SAP wants SAPUI5 on the backend because of integration in the SAP software lifecycle management. But it is bought with bad performance and caching issues. A very high price in my opinion! Luckily OpenUI5 is free to be part of real apps.
A new client of mine has asked for us top recreate their small recruitment website. The main site is going to be done using Zend Framework 1.11 and mySql.
It is medium/small website for a team of two consultant recruiters which lists available positions with various companies and allows candidates to upload CVs and search for positions as well as displaying general information about the consultants.
They have asked that we also create a site capable of displaying on mobile devices (iPhone and Android) using a sub domain of their main site.
My question was this: Is it possible to point the mobi.myclientswebsitedomain.com to the www.myclientswebsitedomain.com site and simply change the layout used based on the detected device?
What is the best way to achieve this with the least effort?
Many thanks for any advice
John
Point your mobi. subdomain to the same webfolder as your www. domain. In your ActionController write conditional statment which will load different css files depending on the current subdomain.
We are looking at building a b2b application for the iPhone. A major concern is the possible delay in publishing updates to the applications. I would like to believe that all updates will be orderly, but the reality of a newly found bug for a client or an upcoming trade show could mean that updating the application NOW is critical. Even an "expedited" day wait would not be acceptable.
One option I have thought of is having a flag for each page that we send down when the user logs into our server. If the flag is set, then instead of the native screen for a given page, there would be a page with a UIWebView that would get the latest HTML from the web or stored HTML loaded at the time of login.
I would prefer storing the HTML and using it "offline" because a data connection cannot be guaranteed.
The questions are:
1) Does this violate any of Apple's licensing?
2) Is this feasible or is there a hole I am not thinking of?
It doesnt violate Apple's guidelines and as far as I know you are not missing anything here...in fact, we have the exact same problem in my company (which on top of the issue that you have, we have customers that would like to "brand" the app for their users, and thats how we accomplish that) and there are no issues with apple (for now...:)). Obviously, you need to think of user experience implications...hope that helps.