27 AnswersNew Answer
first 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 don't launch it to Google browser stick with launching through SoloLearn app - no 404
David Carroll I believe it's a referrer url tracking parameter. It's generated only for links shared from the app--which signify someone used/accessed the link shared via the app. The site has a similar url structure for discussions links. Just with added title in link without added ?ref=app. https://www.sololearn.com/Discuss/2315620/solved-page-not-found-problem Vs https://www.sololearn.com/Discuss/2315620/
Code Crasher Android supports opening appropriate apps for any url. Should the app be a url handler for such domain. Sololearn apps supports code.sololearn.com, www.sololearn.com. When i click any of the linked Q&A or code or even post links with/without '?ref=app'. It will always promp wheather I should open in a web browser or sololearn app unless i set sololearn as default. Even webapk's(if installed) support opening certains domain in installed webapps.(recent stackblitz site for the react tutorial is a good example) There are also android instant apps which allow opening apps without installing the whole thing. You don't need to do this server side. It has been happening client side as far as i can remember.
According to one of your 1st answers. The ios app needed '?ref=app' to open links in the app. Android app did not have an issue with/without the parameter. (The app is the issue.) Feed posts being *app only* won't open in the app and error 404 when on the web, even though you have installed the ios app.
AJ #Infinity Love Regarding the querystring: ?ref=app This isn't related to the HTTP Referrer header in anyway. This appears to be the same key=value pair produced on the web app as well. I'm honestly not sure what it's purpose is. I typically remove it as it takes up characters. Has anyone else seen "?ref=web" as well?
I just read your edited post Code Crasher Both links open in the app on android. I also, like david, have been removing them for a while. It's there for tracking purpose, only. Unless, the ios app depends in a weird way on that parameter...
BroFar 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 Tom Joney (TheCoder) The iOS app does not have a choice to launch thru Sololearn App or Chrome. If you strip the ?ref=app part of the URL from the link in the code it will try to launch in Chrome if clicked from the Web App, but a 404 error will result. I think the reason is that the Android App is using internal DNS and it is not available from the iOS app or the Web App for some reason. The links are not available outside of the Android App. I have tried multiple instances and have had similar results. I have brought this up in discussions, DMs with Mods, and emails to [email protected] The response is that "there are upgrades coming." No ETA when that will be though. FYI.
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 you should direct them in your code to not use the Google browser but when it ask to click the SoloLearn icon after they click on whatever project from the code.
David Carroll Yes I know that this is key value pair but this is defined to identify in back-end where we have to redirect request. This is a kind of HTTP referer as my knowledge. You can write anything according to you. You can write ?ref = abc or ?ref = xyz but in back-end we can use for any purpose who knows. So as per my knowledge Sololearn used this key value as HTTP referer.
BroFar Thanks for your concern, what should I do, so that everyone has the access of the links given in code ?,plz tell 🙏
AJ #Infinity Love Thanks for your concern, but I have not taken the link from website, I got them from Sololearn app & plz tell me what ?ref=app does
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 ?ref = app. Here ref is call as referer means where you want to redirect your URL, where you want to send your request. So here ref = app means your request will go on Application by default when you open in mobile. Sometimes you can see ref = web or something else. If you want to know more about referer you should learn about HTTP referer.
AJ #Infinity Love thanks, I got it 🙂
ok. catching up on all the replies. It sounds like we all are on the same page with the ?ref= keypair. humor me and go to these links in Chrome and then in the Android app: https://www.google.com/search?q=Solved+site%3ASoloLearn.com%2Fposts%2F https://www.google.com/search?q=Solved+site%3ASoloLearn.com%2FDiscuss%2F https://duckduckgo.com/?q=Solved+site%3ASoloLearn.com%2Fposts%2F https://duckduckgo.com/?q=Solved+site%3ASoloLearn.com%2FDiscuss%2F not that this solves anything other than the /post directory isn't indexed, but it is oddly coincidental?
Sorry to say Tom Joney (TheCoder) but it's not my required solution Plz see the question again
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 When you takes link from Sololearn Website and want to link in your code then don't forget to write this at the end of url. ?ref=app
David Carroll I think Lord Krishna explained whatever I wanted to say.
David Carroll Lord Krishna I believe this is just a redirect that the backend picks up to tell it to send a command to open the app. I have never seen ?ref=web which is probably implied if ?ref does not exist? if I type: https://code.sololearn.com/WudPqFy464fn/?ref=walawalabingbang#html that code page still opens in safari. if I have the iOS app open and click on that link in this thread and then share the link... https://code.sololearn.com/WudPqFy464fn/?ref=app They are just tracking where the link was shared from as @Lord Krishna suggested.
Code Crasher Different people write different according to their requirements, according to their understanding so it is not necessary to write ref = web or ref = app. We can write anything as I have previously explained. But the purpose in back-end maybe same. Here Sololearn wrote ref = app because it's look like meaningful name and understandable thing.
To be clear folks... code and discussions work on all platforms with or without ?ref=. Anything with /post/ in the URL returns a 404. I always remove the ?ref=app too. I have sent posts to friends with Android devices without the app installed and the experience is same...404. I don't think ?ref= is the problem.