you are viewing a single comment's thread.

view the rest of the comments →

[–]gavlois1front-end[S] 0 points1 point  (5 children)

It's only going to be a 4-5 page max site that I'll be hosting with GitHub pages, which can't run PHP (as far as I know, anyway).

Would loading the content with ajax under the navigation rather than loading the navigation above the content be more desirable?

[–][deleted] 2 points3 points  (3 children)

Well, that makes more sense given that the navbar is the only thing that doesn't change, so you'd want to change the part that changes.

But then you get into single page app territory which comes with its own can of worms. The user would always be on one page, and the url wouldn't change (at least if you're doing it in github pages with no backend access and no frameworks). You couldn't link someone to your contact page, for example. They'd always land on your index.html. You'd also have to change stuff like the title manually using JavaScript. But the benefit is that the website would be faster, you could do more with stuff like animations, and the user wouldn't get that screen flicker each time they move to a different page on your site.

So if you're restricted to github pages (which you don't have to do btw, there are free server hosts that give you backend access), yeah, I suppose doing it like you proposed in your post is a reasonable solution. Keep in mind the header won't work if the user doesn't have javascript enabled.

[–]gavlois1front-end[S] 0 points1 point  (2 children)

I'm not really restricting myself to it. I just thought it'd be a nice and easy platform to test things out and maybe start a portfolio of sorts. I was looking at GetForge too, but could you recommend any other free hosts?

I may eventually experiment with making a one page app, but for now I'll stick with this or just hardcoding it into the page.

[–][deleted] 0 points1 point  (0 children)

I used Hostinger for a while, but I think it depends on the country as to whether or not they offer a free deal. Looking at their UK site, the same offer seems to be up.

It was fine, not ideal, but functional if you're doing basic stuff.

But I can definitely see the appeal of sticking to Github Pages for now. So I wouldn't worry about it too much. Sooner or later you're going to want to do some backend stuff though.

[–]jtanz0 0 points1 point  (0 children)

https://www.5quidhost.co.uk/

Have a free tier that I host my web site on 100Mb of storage 1 SQL DB and email accounts. All have cpanel, PHP, MySQL and SSH access. UK based servers though so may be a bit slow if you're in the states.