November 29, 200817 yr I've recently been given the task of designing a site for a group but their hosting doesn't support php (or any other server side scripts, as far as I can tell). Changing the hosting isn't really a option. This wouldn't be a problem but its a fairly big site and as a result has a lot of links etc. that are common to each page (headers and footers, more or less). Therefore, if I need to update (or find a typo in a shared bit of the site) I have to update every page individually. Not fun and not really a sensible way to design Are there any techniques I could use (possibly client side? - not my forte) to get around this and have a system a bit like server-side includes for header and footer files? The only solution I could think of, which isn't very good, is this: <script src="header.js"> ... <script src="footer.js"> And have header.js and footer.js as document.write('header stuff goes here'); which I don't really see working anyway. Thanks for any help you can give!
November 29, 200817 yr The studio I worked for during the summer did all their sites that way! I was shocked! They used dreamweaver templates, which sped up the process quite a bit, so when a change needed to be made accross the site, dreamweaver knows which pages to update the code in. I strongly recommend you learn how to use these well for a large project with no server side scripting. Try to be as organized as possible.
November 30, 200817 yr The easiest way is probably Server Side Includes (http://httpd.apache.org/docs/1.3/howto/ssi...astandardfooter). You can't do much in the way of programming, but it'll let you use the same links on every page. It's also straight HTML - the only difference is the page that uses the ssi is called page.shtml
November 30, 200817 yr Author The easiest way is probably Server Side Includes (http://httpd.apache.org/docs/1.3/howto/ssi...astandardfooter). You can't do much in the way of programming, but it'll let you use the same links on every page. It's also straight HTML - the only difference is the page that uses the ssi is called page.shtml That would be the best way to do it. It doesn't seem to be working though, possibly not configured/not allowed by the host. Is there no sensible way to do this via js or similar?
November 30, 200817 yr I know you said choosing another host isn't possible but I would seriously suggest that you inform your client of the benefits they will reap by switching to another host, maybe offer them a small discount to help persuade them as it will benefit you to in the long term!
November 30, 200817 yr Cost is hardly a factor in switching these days. You can get a full php ready environment for less than £30 a year these days.
November 30, 200817 yr Author Cost is hardly a factor in switching these days. You can get a full php ready environment for less than £30 a year these days. Mhm. I'll look into it, last time I checked we had just enough cash for a domain for the year (student society, not especially wealthy). There are some free php hosts out there, but hosting with the university (obviously if this was a professional host I'd never have signed up with them in the first place) should be the sensible option. To get back to topic...no more ideas?
November 30, 200817 yr Mhm. I'll look into it, last time I checked we had just enough cash for a domain for the year (student society, not especially wealthy). There are some free php hosts out there, but hosting with the university (obviously if this was a professional host I'd never have signed up with them in the first place) should be the sensible option. To get back to topic...no more ideas? I'm sure a whole university can scrape together and find £30 per anum!
November 30, 200817 yr Although the javascript may achieve the desired result, you should remember that not everyone has js enabled in their browser, so they would not be able to see any of the included parts of the site. Not very accessible really. A change of hosts seems like the most sensible option to me.
December 1, 200817 yr Your potential client needs a reality check. I'd strongly advise walking away from the project if they won't change hosts. Any large site built without server-side scripting would either be so crippled without JavaScript, or would be such a sod to maintain, that you'll end up losing your hair, or self-respect, or both.
December 1, 200817 yr Author Your potential client needs a reality check. I'd strongly advise walking away from the project if they won't change hosts. Any large site built without server-side scripting would either be so crippled without JavaScript, or would be such a sod to maintain, that you'll end up losing your hair, or self-respect, or both. Yeah, I'll talk to them about paying for some basic hosting. Its one of those situations where you're with a bunch of friends in a society and someone is like OTHERS: "we need a new website" ME: "yeah...we could do with one" OTHERS: "hang on, aren't you a designer ME: "um...maybe?" OTHERS "great...you can get something done by next week?" ME "...yeah, sure..." A month later....what was going to be a couple of afternoons work has snowballed into...this.
December 1, 200817 yr One other option, which is not really brilliant, is to generate the code locally using php includes etc - then just pump out the parsed html when you export it all. Bit of a bind, but would save you some time in development.
December 1, 200817 yr If you're going to do this job properly then you'll need some decent web hosting... it's as simple as that. PHP/mySQL are bog standard features nowadays, and like has already been said you can get some good deals for a reasonable price.
Create an account or sign in to comment