Inhalte aufrufen

Profilbild

Mobile device detection


  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
7 Antworten zu diesem Thema

#1 nickh

nickh

    Erfahrener Benutzer

  • Members
  • 129 Beiträge

Geschrieben: 25 June 2015 - 20:05

Hi guys,

 

I can see that a 51degrees config file is included in the root of the solution, but it doesn't appear to be used...

 

How is mobile device detection done in SmartStore.net?



#2 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1118 Beiträge

Geschrieben: 25 June 2015 - 23:09

Well, actually 51degrees.config is not delivered since V2.1 anymore. Maybe you upgraded from a previous release, in this case the file is obsolete. Just ignore or delete it.

 

Since V2.1 we follow a more lightweight approach:

  • ua-parser is used to parse and tokenize the user agent string
  • The tokens for OS, Device and Browser are then analyzed to classify the device.

See class SmartSore.Services.Common.UAParserUserAgent.


Murat Cakir
SmartStore AG


#3 nickh

nickh

    Erfahrener Benutzer

  • Members
  • 129 Beiträge

Geschrieben: 26 June 2015 - 15:52

Thanks Murat, I'll take a look at UAParserUserAgent.



#4 nickh

nickh

    Erfahrener Benutzer

  • Members
  • 129 Beiträge

Geschrieben: 15 August 2015 - 12:25

Sorry to bring this up again, but I've been noticing intermittent results from Google's "mobile friendly test".  After taking a deeper look into this, it made me wonder...shouldn't the DontUseMobileVersion value in the [GenericAttribute] table for the search engine customer be set to "False"?  Otherwise, it will always return the desktop theme for all search engine bots...correct?


  • MediArt gefällt das

#5 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1118 Beiträge

Geschrieben: 17 August 2015 - 15:52

That's strange. Although we use rel=nofollow on the switcher links, at least one search engine has obviously followed the link and has set DontUseMobileVersion to true.

 

I've created an issue for this. Until then, you should set the value to false manually in the database.


Murat Cakir
SmartStore AG


#6 nickh

nickh

    Erfahrener Benutzer

  • Members
  • 129 Beiträge

Geschrieben: 17 August 2015 - 18:44

Thought so.  Thanks for confirming.  Will this have any adverse affect on the desktop theme's search engine ranking / performance?



#7 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1118 Beiträge

Geschrieben: 18 August 2015 - 16:44

Fortunately not: http://www.thesempos...affect-desktop/


Murat Cakir
SmartStore AG


#8 Michael Herzog

Michael Herzog

    SmartStore AG

  • Administrators
  • 3497 Beiträge

Geschrieben: 19 August 2015 - 10:25

Hi,

 

I've changed the type of the button. Instead of a simple link a form post will now be performed. You can already implement this in your store by overwriting the following files:

 

\SmartStore.Web\Themes\Mobile\Content\styles.css

\SmartStore.Web\Views\Common\ChangeDeviceBlock.Mobile.cshtml

\SmartStore.Web\Views\Common\ChangeDeviceBlock.cshtml

 

Regards

Angehängte Bilder


Michael Herzog
Smartstore AG