Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Reminded me of my go-to include method from back in the day: http://www.moock.org/webdesign/javascript/client-side-includ...


Stupid question: any major drawbacks to using this method?


Lots.

The "include" file is just a js file that document.writes your html, so its not easy to make edits because you would need to do it in a big stream of escaped code.

They won't work if user has js turned off.

They are awful for seo because the includes will not be there when the page is crawled

They are not semantic for writing things like <html><head> and will throw your browser into quirks mode because your page would effectively start with a script tag.

But I used the hell out of them back when dynamic hosting was hard to come by (geocities, tripod etc)


Thanks!

I'm in the fun position of essentially being a graphic designer made to be a web designer in a stingy startup environment where they don't want to pay someone to actually code things. Another designer and I put together a very sad website, and I wouldn't mind having a system for having includes for my header and footer, but even simple concepts like preprocessing scare me off. Heck, I run scared at the mention of the command line. I guess the only real answer is to bite the bullet and learn this stuff (I do frequent HN after all, you'd think I'd be more comfortable with some of these concepts).


Yeah, "biting the bullet" is probably a good idea. As someone with a graphic arts degree who's been a "web designer" for years, I can tell you the potential for making money at anything entirely with front-end and design skills seems vanishingly small. The days when having an ftp account and Notepad were all you needed are long, long gone.

I know enough git to be able to manage the basics (pulling and pushing) and a bit of command line stuff. If you ever get into working with web frameworks in just about any language, I think those are going to be kind of essential. It's probably not going to be as scary as you think though.


No problem, keep at it and keep reading hn! This might be a nice good look for you to try, I have heard good things: http://hammerformac.com/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: