1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CSS menu preventing display of other unordered lists

Discussion in 'CSS' started by wiseguy, Apr 9, 2015.

  1. wiseguy

    wiseguy Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #21
    Okay, I've emailed a few friends from around the country and Europe. I asked them to go to my site with their mobile devices. Every single one has reported back that they were redirected to the mobile site and that the site worked well in their mobile browsers. They were able to access the desktop version with the link provided without being caught in a redirect loop (the cookie from the redirect script obviously works).

    I don't know how you got what you did in those screenshots but it evidently is not typical.
    SEMrush
     
    wiseguy, Apr 15, 2015 IP
    SEMrush
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,149
    Likes Received:
    1,704
    Best Answers:
    239
    Trophy Points:
    515
    #22
    I'm surprised given how that site is built it "works" for anyone, unless they have a different definition of "works" than I do.

    Wait, that scripttard BS also uses cookies? Wonder if my privacy settings are what's screwing with it...
     
    deathshadow, Apr 15, 2015 IP
  3. wiseguy

    wiseguy Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #23
    To them "works" means they are able to navigate the site and access the information they were seeking. The cookie only prevents the browser from redirecting a second time thus allowing mobile users to go to the desktop version if they choose. Do you block all cookies and javascript?
     
    wiseguy, Apr 16, 2015 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,149
    Likes Received:
    1,704
    Best Answers:
    239
    Trophy Points:
    515
    #24
    Sounds weird that you'd have a redirect back condition in the first place, much less that it would fail the same test that sent users there in the first place... or that you'd track that client-side using cookies... across domains (which shouldn't even work in the first place unless you're using insecure cross-subdomain cookies)...

    ... and in terms of blocking scripting, if scripting were blocked why/how would it redirect back?

    NOT that you shouldn't have a plan in place for if cookies and scripting don't work for not logged in guests who are just after content; that's why using scripttardery for this is one of the DUMBEST things I've ever heard of, particularly when it has zero graceful degradation.

    It's basically missing the entire point of modern responsive design, device neutrality, and even the ENTIRE reason HTML exists in the first place!

    Do you have a source for where Google would actually advocate such a jacktarded outdated halfwit method of doing things? You mentioned such I'm not seeing it anywhere and given it's the EXACT opposite of what media queries are for yet for some reason you have a media query in there on a LINK... just doesn't make any sense whatsoever.

    I'm SHOCKED, in fact flabberghasted that what you are doing "works" for anyone in a manner they would find usable/functional as, well -- both in terms of what it is doing and how it is written, I'm just not seeing it AT ALL!
     
    deathshadow, Apr 16, 2015 IP
  5. wiseguy

    wiseguy Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #25
    There is no "redirect back" condition. This is how it works. Someone visits my desktop site with a browser size of less than 800px wide they are instantly redirected to the mobile version of that page. If they choose they may click a "View Desktop Version" link at the top of the page and they can view the desktop version without being redirected back to the mobile version again (thanks to the cookie). It's a very simple and small javascript that works.

    Is this what you want to see?
    https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls
     
    wiseguy, Apr 16, 2015 IP
  6. IQdesigns

    IQdesigns Well-Known Member

    Messages:
    359
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    130
    Digital Goods:
    2
    #26
    email me I'll help
     
    IQdesigns, Apr 16, 2015 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,149
    Likes Received:
    1,704
    Best Answers:
    239
    Trophy Points:
    515
    #27
    Well, it's what I was asking for, but most certainly NOT what I want to see.

    That they would even SUGGEST detecting user agent strings (aka browser sniffing) or two pages earlier even SUGGEST using JS for responsive layout pretty much means that whoever wrote that entire section has no damned business telling anyone how to make a website! -- In fact I would go so far as to say that LAYOUT concepts being under a section about "Mobile SEO" is proof that whoever wrote that article doesn't know enough about HTML, CSS OR search to be cleaning the toilets at Google, much less writing howto guides for them.

    Mein gott, that HAS to be one of the biggest candidates for "the dumbest **** on the Internet" this side of their latest iterations of the pagespeed tool giving lower rankings to faster pages JUST because they don't use a CDN (you'd almost think they were shilling for CDN's) or their alleged page "speed" service pissing on accessibility AND speed with scripttardery that doesn't work.

    It's like Google WANTS to be the next Yahoo or Ask Jeeves at this point.

    -- edit -- Wait, which of your scripts is supposed to be providing said functionality as I'm not seeing it...

    Though seriously, these two:
    http://www.karaoke-tutor.com/maillist.js
    http://www.karaoke-tutor.com/searchpanel.js

    Are you ***ing kidding me?!? Seriously are you intentionally trolling, or do you actually think that's a valid site building method?!?
     
    Last edited: Apr 16, 2015
    deathshadow, Apr 16, 2015 IP
  8. wiseguy

    wiseguy Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #28
    Since you believe you know more than the experts at Google maybe you should go there and show them the error of their ways. Hell, maybe they'll let you run the place.

    When it comes to the right way, and/or acceptable way, of doing things I'm going to take Google's ideas over yours every time.

    External javascript has been common practice for a long time. The site search I use is powered by javascript. By placing all the code in that .js file it allows me to add the search panel to a page without cluttering it up unnecessarily.
     
    wiseguy, Apr 16, 2015 IP
  9. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,149
    Likes Received:
    1,704
    Best Answers:
    239
    Trophy Points:
    515
    #29
    The bloated markup should be cut in half, modernized and put into the page -- you want to 'not clutter it up' glue that stuff together server-side.

    Document.write creates a reflow, reparse AND delays the page load much like innerHTML, that's why both techniques are frowned upon these days...

    But those aren't even the 'big issue'. The ridiculous absurdity of these are:

    document.writeln("<script language=\"Javascript\" type=\"text/javascript\">");
    document.writeln("    var fieldstocheck = new Array();");
    document.writeln("    fieldnames = new Array();");
    document.writeln("    function checkform() {");
    document.writeln("    for (i=0;i<fieldstocheck.length;i++) {");
    document.writeln("    if (eval(\"document.subscribeform.elements['\"+fieldstocheck[i]+\"'].value\") == \"\") {");
    document.writeln("    alert(\"Please enter your \"+fieldnames[i]);");
    document.writeln("    eval(\"document.subscribeform.elements['\"+fieldstocheck[i]+\"'].focus()\");");
    document.writeln("    return false;");
    document.writeln("    }");
    document.writeln("    }");
    document.writeln("    return true;");
    document.writeln("    }");
    document.writeln("    function addFieldToCheck(value,name) {");
    document.writeln("    fieldstocheck[fieldstocheck.length] = value;");
    document.writeln("    fieldnames[fieldnames.length] = name;");
    document.writeln("    }");
    document.writeln("    </script\>");
    Code (markup):
    document.writeln("<script language=\"javascript\">function killerrors(){return true;}window.onerror = killerrors;</script\>");
    document.writeln("<script language=\"javascript\">function saveselection() {if (document.form_search.sw) document.cookie='sw='+escape(document.form_search.sw.value);};function readcookie(sname){var c=document.cookie;if (c.length<0) return false;var b=c.indexOf(sname+'=');if (b==-1) return false;var d=c.indexOf(';',b);if (d==-1) d=c.length;return unescape(c.substring(b+sname.length+1,d));};function readselection() {if (document.form_search.sw) {c=readcookie('sw');if (c) document.form_search.sw.value=c;};};</script\>");
    document.writeln("<script language=\"JavaScript\">function OnSearchSubmit(){var b_return=true;if (document.form_search.sw){for(var i=0;i<document.form_search.sw.value.length;i++){if (document.form_search.sw.value.charAt(i)!=\" \")	{lh=\"searchresult.html?sw=\"+encodeURIComponent(document.form_search.sw.value);b_return=false;break;}}}if (b_return) return;saveselection();window.open(lh,\"_self\");}</script\>");
    Code (markup):
    If all you are doing there is creating functions in the global scope (which is PRECISELY what you are doing) why in the blue blazes are you wrapping them in document.write?!? Much less the pointless/ridiculous EVAL indicating that whoever wrote those scripts doesn't know enough JS to be writing JS... and that's before we talk the outdated Nyetscape 4 form access that can't be relied upon...

    Let's just take that first script, there is NO reason for that to be a heck of a lot more than:
    var fieldsToCheck = {};
    	
    function checkForm() {
    	for (var i in fieldsToCheck) if (document.subscribeform.elements[i].value == '') {
    		alert('Please enter your ' + fieldsToCheck[i]);
    		document.subscribeform.elements[i].focus();
    		return false;
    	}
    	return true;
    }
    
    function addFieldToCheck(name, description) {
    	fieldsToCheck[name] = description;
    }
    Code (markup):
    With NONE of those document.write being necessary or to be brutally frank, even serving a legitimate purpose! I'd probably also make it an object to isolate scope, and make it auto-attach itself to markup instead of dicking around with the "addFieldsToCheck" nonsense. Class parsing is great for this; NOT that I trust client side validation in the first place since you STILL have to check it again server-side!

    NOT that said code would work any better since neither is actually a valid return handler unless you are doing something stupid like onsubmit="return checkform()" instead of properly attaching the event as a listener.

    Of course the scripts to call scripts to call scripts garbage would explain why the page is so painfully slow (well, in addition to the rubbish jQuery bloat). Extra handshakes and so forth; more so when said handshakes trigger a reparse and reflow AND hang the render.

    I'm... again flabberghasted that anyone would even consider writing scripting that way. Just where did you come up with that disaster of how NOT to write JS?
     
    Last edited: Apr 16, 2015
    deathshadow, Apr 16, 2015 IP
  10. wiseguy

    wiseguy Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #30
    That script was created by a program called Search Engine Builder Pro. I didn't alter it.
     
    wiseguy, Apr 16, 2015 IP
  11. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,630
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #31
    Just a side-note - I don't know exactly how your check for browser-size works, but if I shrink my browser-window to less than 800px, remove all cookies, and reload the page, it won't show me the mobile version - which means the site is basically more or less unusable, since it demands side-scrolling all the time. An elastic layout would prevent that from happening. If I load the mobile sudomain directly, it works, of course, but that subdomain have the standard problem of a mobile site, that it doesn't have a max-value on width - hence if I maximise the browser-window, it stretches to fill the whole page, which makes lines that are very hard to read.
    On that note - ALL mobile browsers nowadays have a "request desktop site" function - there should be no need for the button to view the desktop version. If the redirect is done properly (forget about checking for size, check for touch-capabilities and user-agent, if anything) it should do the right thing and redirect to m.whatever - but, as we've been trying to tell you, rewriting it to work fluently regardless of screen-size would be a much better choice, as it just reformats the page based on the current size of the window.
     
    PoPSiCLe, Apr 16, 2015 IP
  12. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,149
    Likes Received:
    1,704
    Best Answers:
    239
    Trophy Points:
    515
    #32
    ... and that is why I don't trust off the shelf code; MOST of it is written by people who have ZERO business writing code for ANYONE. HOLY HANNAH that's some ignorant inept halfwit garbage -- and anyone who knows the slightest about JS or HTML should recognize that.

    You've been led down the garden path so far by bad practices, outright garbage code, and disinformation written by people who have ZERO business telling you how to do a blasted thing... again, I'm shocked the site actually works for anyone.
     
    deathshadow, Apr 16, 2015 IP
  13. wiseguy

    wiseguy Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #33
    Browsers, including mobile browsers, send both their user agent and screen size information when requesting a web page. Keeping up with all the devices is a real nuisance when intercepting them by screen size works just as well. If the browser you are using has an actual width of under 800px, and supports javascript, it will be redirected to the mobile site. Once this happens a cookie will be set that will prevent the redirection from happening again. This is to allow the browser to access the desktop version if the user chooses to do this.

    Responsive design is not suited for ALL websites and pages. There are several areas of my site that simply should not be viewed with a small screen size. There are tutorials that use screenshots that cannot be viewed effectively with an iPhone. I do not deny mobile users from these pages but If they want to get the full value from them they will access them with a larger browser.
     
    wiseguy, Apr 17, 2015 IP
  14. kk5st

    kk5st Prominent Member

    Messages:
    3,486
    Likes Received:
    367
    Best Answers:
    28
    Trophy Points:
    335
    #34
    You see, that's what's wrong with your approach; proper responsive design is implemented at the client. I don't understand why, when it is obvious you're on a road traveling toward a dead end, you continue defending a decision based on obsolete technology and methods.

    gary

    //edit: I should add that a browser need not report a referer. I quite often suppress or modify my browser's referer for reasons of my own.
     
    Last edited: Apr 17, 2015
    kk5st, Apr 17, 2015 IP
  15. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,630
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #35
    @wiseguy: so, what you're saying is that you demand users to use a full-screen desktop browser, and if they don't, they still get the desktop version, unless they specifically load the mobile subdomain. Sounds stupid to me. I also wonder what you mean by "actual width" - the browser should report the ACTUAL width it's at, not a potential max-width. So where you get the "actual width" thing from, I'm not sure. If I set the browser to 640px wide, then it should load a mobile/tablet/small-screen friendly site, regardless of whatever max-resolution is available. Yours don't.
     
    PoPSiCLe, Apr 17, 2015 IP
  16. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,149
    Likes Received:
    1,704
    Best Answers:
    239
    Trophy Points:
    515
    #36
    Set them max-width:100%, make them links to just the image so they can open it and zoom/pan around it like any other image. NOT rocket science.

    Generally those giant images you have inlined in your pages (like the example you linked to) are too damned big to have any business on a content page in the first place, and should be thumbed with the option to open them to full size. That page in general (and I would assume most pages you are saying that about) while often well written are poorly organized lacking clear headers and sections, or internal section navigation/section summaries and links that would make them easier to navigate and digest.

    It's what I meant by breaking them into multiple pages and rewriting them to be better organized; they're barely desktop friendly... in fact I might not even go so far as saying they are that.

    ... admittedly I have the same issue with a few of my pages on ewiusb.com - but I was able to overcome that fairly simply. See how I handled the screenshots of my Aria replacement skin:
    http://www.ewiusb.com/ariaEnhancedSkin

    Or the pictures in the disassembly/breakdown:
    http://www.ewiusb.com/breakdown

    Though the PRE text on the reverse engineered controller settings remains problematic. TECHNICALLY I should have made some of those tabular data, but was working with raw output from a little pascal proggy I wrote to monitor the MIDI output and the output log from MIDI-OX.

    Still, it's by no means an unsurmountable obstacle, though when working with existing content that wasn't created content oriented or with good practices it's easy to feel painted into the corner. See how I felt four or five years ago working with "professional writers" who kept handing me word documents that simply weren't... well... thought through in a web friendly manner.

    As much as I rail against designing content to a design, you do have to take the limitations of the medium (HTML, CSS, screen sizes and accessibility norms) into consideration when generating and organizing the content.

    Honestly, the images on pages like that last one you linked to are so hard to make out anyways, I'd have preferred thumbnails with links to larger versions anyways. It would probably save you bandwidth too since dimes to dollars most people viewing those articles aren't fully paying attention to every one of those images anyways... at least not if your content text is written properly. (which in terms of flow it does, just needs some more structure)
     
    deathshadow, Apr 18, 2015 IP
  17. wiseguy

    wiseguy Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #37
    No, that's not what I said an I don't know how you comprehended it that way. I really can't explain it any clearer without drawing pictures so I guess you can just continue to misunderstand.
     
    wiseguy, Apr 18, 2015 IP
  18. wiseguy

    wiseguy Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #38
    Because it is not obsolete technology. A very large number of webmasters are currently creating subdomains for mobile browsers. It is also one of the methods that Google recommends to assure that mobile friendly websites are indexed properly. Yes, I know it's possible to suppress or spoof your browsers user agent but very few people do this. Too few to make the slightest impact.
     
    wiseguy, Apr 18, 2015 IP