Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
I can't speak on the Google Webmaster side of things, but you're on the right track as it is.
Absolutely do not set the new domains content as "noindex,nofollow" unless you do not want the pages indexed/crawled!

301 is "Moved Permanently" so when a bot crawls your site it isn't indexing the original domain, it's being told the content is now at this new location. This both preserves your ranking because you're telling the bot it's the same content, and indexes the new locations content while discarding the old locations data. If you set noindex or nofollow you'll be telling bots you don't want those pages tracked, and it'll blow away your existing rankings.

My usual course of action has been to wait until google searches for the old domain ("site:mydomain.com") stop giving me back results, which indicates the index having been updated and my redirects crawled. At that point I can let the domain lapse without caring, though keep in mind any links to your old site from other sites will break. You could use Google Analytics to check referrers and see if it's possible to get those links updated by contacting the author, but that's less SEO related.

Adbot
ADBOT LOVES YOU

Ether Frenzy
Dec 22, 2006




Nap Ghost
Good to know, thank you for keeping me from doing something dumb there with noindex/nofollow!

Certainly appreciate the information, I've never had to move a domain like this 1:1 before and SEO is definitely not something I keep up on much so it's a bit of a 'poke it in google analytics and see what happens' situation.

YO MAMA HEAD
Sep 11, 2007

Not sure if this is completely portable (certainly not browserwise), but I just set up the following as a BBEdit Clipping to insert line number for debugging JS in Chrome:

code:
console.debug('LINE: ' + (new Error).stack.split('\n')[1].split(':').reverse()[1]);

Pivo
Aug 20, 2004


If I want to reload a page and not have Chrome and other browsers scroll to the previous location in the page, is there a good way to do it? scrollto or whatever even onload seems to run before the browser does that and it's weird, it scrolls like... halfway up to where it was before.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Pivo posted:

If I want to reload a page and not have Chrome and other browsers scroll to the previous location in the page, is there a good way to do it? scrollto or whatever even onload seems to run before the browser does that and it's weird, it scrolls like... halfway up to where it was before.

Is there a hash in the location, or is it just the current scroll position being saved?

Pivo
Aug 20, 2004


Subjunctive posted:

Is there a hash in the location, or is it just the current scroll position being saved?

Just the current scroll position. It's a browser thing, I know we're not doing it on purpose. Just doing window.reload(true) or whatever it is to not grab from cache, since we've got a modal where people do some poo poo and if it succeeds we want to reload the page and we show a little success thing at the top and then their new data. The page has gotten long though and I'm annoyed that some browsers save the scroll position (although it's awesome when I'm actually browsing the web) so people don't see that success message and it looks all hosed.

Don't ask me, I'm not a front-end guy, just got roped into it like so many of us do.

Chenghiz
Feb 14, 2007

WHITE WHALE
HOLY GRAIL

Pivo posted:

Just the current scroll position. It's a browser thing, I know we're not doing it on purpose. Just doing window.reload(true) or whatever it is to not grab from cache, since we've got a modal where people do some poo poo and if it succeeds we want to reload the page and we show a little success thing at the top and then their new data. The page has gotten long though and I'm annoyed that some browsers save the scroll position (although it's awesome when I'm actually browsing the web) so people don't see that success message and it looks all hosed.

Don't ask me, I'm not a front-end guy, just got roped into it like so many of us do.

If you don't have any other javascript that executes on page load, put this in a script tag after your <body> tag closes:
JavaScript code:
window.scroll(0,0);
if you do have javascript that executes on page load, just put it alongside that stuff.

Pivo
Aug 20, 2004


Chenghiz posted:

If you don't have any other javascript that executes on page load, put this in a script tag after your <body> tag closes:
JavaScript code:
window.scroll(0,0);
if you do have javascript that executes on page load, just put it alongside that stuff.

told ya, did that, didn't work. except I tried scrollTo which is apparently the same. idk maybe I did it wrong. I tried to put it in jquery's DOM ready handler, then I tried to add it to load.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Set location.href to "page.html?thing=random" maybe?

Pivo
Aug 20, 2004


Subjunctive posted:

Set location.href to "page.html?thing=random" maybe?

Yeah I'll try that I guess, sending useless params to our backend yay, window.reload is so much cleaner.

I don't know how you guys do this, or *like it*. Whenever I have to touch front-end I end up tearing my hair out. *sigh*

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Pivo posted:

Yeah I'll try that I guess, sending useless params to our backend yay, window.reload is so much cleaner.

I don't know how you guys do this, or *like it*. Whenever I have to touch front-end I end up tearing my hair out. *sigh*

Reload is weird, and historically constrained. You could try setting location.href to itself as well, just because it's different.

I'll ask some Firefox and Chrome devs, this should be doable. :colbert:

Chenghiz
Feb 14, 2007

WHITE WHALE
HOLY GRAIL
It's weird that .scroll only goes halfway up the page, maybe something is interrupting it. maybe something trying to take over scroll functionality?

Also, just pointing out, I can't think of many reasons you should have to use window.reload. Really the only one I can think of is if you're using appcache and you've swapped caches.

Pivo
Aug 20, 2004


Chenghiz posted:

It's weird that .scroll only goes halfway up the page, maybe something is interrupting it. maybe something trying to take over scroll functionality?

Nah, I thought maybe some sort of Javascript tabbing to a form field thing but we have none of that poo poo on that page, I thought maybe images popping in so that's why I tried the load handler instead of ready, I honestly have no loving idea. We've got nothing that changes scroll position anywhere that I've ever seen and I've looked through, well, all the scripts that get loaded on that page at least.

It's probably something stupid. It's always something stupid. I'll bet you that doing location.href or whatever will fix it since it forces the issue instead of asking the browser to reload, it's just so uuuuuugly.

I'd have a lot fewer problems if I didn't care so much about details. And I told you, using reload because basically we do AJAX to mess with some data, so refresh the page to clear the modal and show new data + success message, only on success. Otherwise they get to play with the form some more.

Yes, could do it ALL in JS, but a refresh is better since the data changes they do change some session parameters that change some view things and a refresh is just simpler, and totally not unusual.

Pivo fucked around with this message at 05:37 on Aug 21, 2014

Fuoco
Jan 3, 2009
A related option might be to set a hash to an element that appears at the top of your page before reloading:

http://jsfiddle.net/fmodsfhc/
http://fiddle.jshell.net/fmodsfhc/show/

Pivo
Aug 20, 2004


Hehe you guys call them hashes. Way to overload that word! I thought they were 'anchors'. But yes I'll try that too.

spacebard
Jan 1, 2007

Football~

Pivo posted:

Hehe you guys call them hashes. Way to overload that word! I thought they were 'anchors'. But yes I'll try that too.

If you're really nerdy you refer to it as the URL fragment. :smug:

zfleeman
Mar 12, 2014

I wonder how you spell Tabasco.

spacebard posted:

If you're really nerdy you refer to it as the URL fragment. :smug:

octothorpe

prom candy
Dec 16, 2005

Only I may dance

fuf posted:

gently caress me is there some universal law that if you make a website for someone they will only ever look at it on IE8? :negative:

Make browser support clear in your estimate/contract.

kedo
Nov 27, 2007

prom candy posted:

Make browser support clear in your estimate/contract.

This is good advice. Here's my little browser support chunk in case anyone wants to steal it:

quote:

• Testing layout for all modern web browsers (Internet Explorer 9–current, current versions of Firefox, Safari and Chrome), using baseline browser resolution and connection speed for target audience. Additional testing for commonly used smartphones and tablets (including Android and iOS platforms). Additional support for obsolete browsers may be requested for an additional fee.

The "additional fee" bit is pretty sweet and has served me well in the past. I'm intentionally vague regarding resolution and connection speed so that I can point to analytics for a client's given industry/location and say, "no, your 28.8k connection on IE 6 is not at all what your audience is using. However I'd be happy to test for that use case and bill you hourly for the work."

Sulla Faex
May 14, 2010

No man ever did me so much good, or enemy so much harm, but I repaid him with ENDLESS SHITPOSTING
I'm finished with the first version of my website's content, but I'm struggling a bit with the optimisation and design. The site is:

http://www.marianminds.com/

I've optimised it as best I can according to: http://www.webpagetest.org/result/140824_HW_S7J/1/details/

There's some issue with the domain name (when I input it without the https://www. it spends 350ms loading the first TTFB and then redirects and queries again) which I will look into. The site seems to load pretty slowly but I'm on a dedicated OVH server so I'm not sure if it's just the lovely network (normally gets 11MB/s upload though..) or what.

I'm also going through trying to consolidate and trim all the CSS, foundation.min.css is 96%+ unused. So that'll remove some of the clutter.

Does anybody have any other ideas? Is it something I might be able to improve myself or is it an issue with the server network at OVH?

Also any general comments on the site would be much appreciated, I was thinking of figuring out how to make an SVG of the header title and using that instead so it scales for mobile etc. It used to have a prettier font but I removed it because I was downloading an entire font just for the page title.

I understand that the site design is really poo poo, I wanted minimal and clean and I think what I got instead was tacky and half-arsed. Oops.

edit: Okay well I replaced the header with an svg and mucked around a little bit. It looks a little better and the logo resizes now. Finally also fixed the dumb extra pixel space at the bottom. I just gotta test on a few different browsers and devices, but I'm pretty happy with most things I guess..

Sulla Faex fucked around with this message at 22:48 on Aug 24, 2014

Pollyanna
Mar 5, 2005

Milk's on them.


Is there a better way to format address information than like this?



Or should I dump the extraneous information and just have an email link and a Github link?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Pollyanna posted:

Is there a better way to format address information than like this?



Or should I dump the extraneous information and just have an email link and a Github link?

Umm, it depends on why and where you want your information.

kedo
Nov 27, 2007

Why would you ever have address info in an ordered list?

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS

Pollyanna posted:

Is there a better way to format address information than like this?



Or should I dump the extraneous information and just have an email link and a Github link?

This is a joke, right?

This is the web design and development thread, not the "teach me how to write an address", go to the small/stupid questions in A/T if you can't figure out the answers to these mundane questions using google.

Pollyanna
Mar 5, 2005

Milk's on them.


What I meant was whether there was an accepted standard for formatting addresses on a web page. Which, as far as I can see, there isn't. I know how to write an address, thank you very much.

I ditched the idea of an address field, anyway. Working on why my site doesn't want to shrink past 960px now.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Pollyanna posted:

What I meant was whether there was an accepted standard for formatting addresses on a web page. Which, as far as I can see, there isn't. I know how to write an address, thank you very much.

Turns out there is a standard! It's pretty loose. If it's contact info for the document (or nearest <article>), stick it in an <address>. Otherwise just throw it in a <p> or something.

Also I'm sure there's some hilarious microdata syntax for a mailing address if you really want to junk it up.

RobertKerans
Aug 25, 2006

There is a heppy lend
Fur, fur aw-a-a-ay.

pokeyman posted:

Turns out there is a standard! It's pretty loose. If it's contact info for the document (or nearest <article>), stick it in an <address>. Otherwise just throw it in a <p> or something.

Also I'm sure there's some hilarious microdata syntax for a mailing address if you really want to junk it up.

pre:
class=h-card
  class=p-name
  class=p-street-address
  class=p-locality
  class=p-postal-code
  class=p-tel
  class=u-url

As i recall, the last version of the spec integrated well with Android (added to contacts perfectly), but not with iPhone. Gives some styling hooks at least.

Pollyanna
Mar 5, 2005

Milk's on them.


Huh. I knew about <address>, but not about the classes. Interesting.

I ended up ditching the contact information, in the end. A simple Github link will suffice. Maybe I'll include my email too (should probably make a profession-specific email instead). So now I'm just focusing on making the site look pretty, which right now it reaaaally doesn't.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Are microformats still a thing? Do they have to be?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I just assumed they ended up in the <graveyard/>

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Subjunctive posted:

Are microformats still a thing? Do they have to be?

I figure if they were a thing Google and Facebook would be looking for them when parsing stuff, which I'm assuming was the whole idea. Seems to have fallen by the wayside as a concept.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
I thought we were supposed to be using Rich Snippets for structured data, at least as far as lazy SEO is concerned.

https://schema.org/

Why isn't this the standard for extracting data, like addresses and hone numbers, too?

RobertKerans
Aug 25, 2006

There is a heppy lend
Fur, fur aw-a-a-ay.

Subjunctive posted:

Are microformats still a thing? Do they have to be?

I still use the hcard spec for addresses etc, & I'd give them similar class names anyway, so I figure why not. As I said, I seem to remember Android phones/tablets working really nicely, but iPhones not (needed an actual hcard download, & assuming security restrictions re downloads nixed this?), so I just gave up carefully trying to match spec exactly; Google seemed to be good at reading things, so maybe was worth sticking with, but maybe it was just correctly parsing things in address tags v0v I gave up taking any notice. It's a nice idea, but checking against the current spec & whether it's useful for targeted platforms & generating reams of XML-lite in the hope it'll have some small effect isn't fun (even worse for sodding schema.org, which is an even nicer idea and an even more [necessarily] verbose implemention)

RobertKerans fucked around with this message at 16:19 on Aug 26, 2014

Kobayashi
Aug 13, 2004

by Nyc_Tattoo

Subjunctive posted:

You can run script that you trigger from native during momentum, but the web view won't visibly react to it.

Rumor has it this is finally going to work in iOS8. If true (and if that means what I think it does), it is going to dramatically improve my prototyping game.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Kobayashi posted:

Rumor has it this is finally going to work in iOS8. If true (and if that means what I think it does), it is going to dramatically improve my prototyping game.

Aw yisssss.

In other news, MakeDrive looks pretty amazing: offline/online filesystem-like storage for the browser, replicated incrementally to a node-JS service. David Humphrey is a good friend of mine, and does really solid work.

http://blog.humphd.org/introducing-makedrive/

fuf
Sep 12, 2004

haha
Is there a way to transition from height:100% to height:auto? I know you can't animate to height:auto, but I found some workarounds that use max-height. But all the examples are based on starting from height:0 and I dunno how to do it with height:100%.

obstipator
Nov 8, 2009

by FactsAreUseless

fuf posted:

Is there a way to transition from height:100% to height:auto? I know you can't animate to height:auto, but I found some workarounds that use max-height. But all the examples are based on starting from height:0 and I dunno how to do it with height:100%.
You could do

max-height:100%;
height:100%;
@include transition(max-height, 1s);

to

max-height:9999%;
height:auto;
min-height:100%; // not sure if you want this


Is that the kind of effect you're looking for?

fuf
Sep 12, 2004

haha
Thanks but I can't get that to work either. The heights are all correct but there's no animation - it just jumps to the new height.

fuf
Sep 12, 2004

haha
got it working with min-height instead. :)

min-height:100%;

transitions to

min-height:0%;
height:auto;

Adbot
ADBOT LOVES YOU

Pivo
Aug 20, 2004


I ran into a funny issue recently you guys might find amusing. So we had some text we wanted to vertically centre in a div right. Width and height was fixed so it wasn't a challenge, although still used CSS translate or whatever to do it "the right way". The weird thing is, on OS X across all browsers, the + that we were displaying was off! It kept ending up being lower than we expected! But on Windows and Debian, it was always smack dab in the middle just like we wanted. What the gently caress was going on?

Turns out we preferred Helvetica Neue, Helvetica, and Arial in that order. Debian and Windows didn't have the Helveticas so went to Arial. Why does this matter? Arial puts the + symbol vertically centred on the median, Helvetica puts the + symbol on the baseline (WHICH IS STUPID).

Solution? Just use Arial for that element. Macs have that. Dumbest loving thing...

See why I don't like front-end work?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply