-4

I have an important question. I am currently making a website and Ihave a canva picture at the front page. It uses my file though, so will other people be able to see it?I also made a bunch of hyperlinks that link to my other files. When I publish it in github will people be able to see the files(only I own) or will they get a error message...

I tried asking chat-gpt but it says they won't see it but I am still unsure because Ididn't tell it I will be publishing on github.

  • Anything your website sends to a browser will be available to anybody who goes to your site. That's the fundamental nature of a website: you send stuff to client browsers. – Pointy Jul 20 '23 at 02:32
  • Any files you want end users to see have to be available on the web somewhere (usually on the same server as the website, but they can be hosted elsewhere). If those files are only on your computer, only you will be able to see them; everyone else will get broken links. – ralph.m Jul 20 '23 at 02:34

1 Answers1

-1

I am not familiar with Github's specific case with regards to how it hosts your website, so I cannot answer for this specific case. However, for any data (whether that is images or those other files you were talking about) to be received by the client(s) (the viewers of your website) the files/data either needs to be published along with your html, css, and js (1), or you need to develop a backend system that can fetch this data from a server on which the data is stored (2).

Case (1) can be incorporated by simply publishing an entire folder which can house your html, css, js and have separate folders within itself for any data that you reference, such as images or other documents. The links to these data should also be adjusted in your html and js to ensure that they now point to the new locations of the data.

Case (2) can be incorporated in multiple ways, but I am not sure if Github hosting allows/runs a backend, which is what this case relies on. An example of how, in general, one may fetch resources from a server so that they may delivered to clients is here.

I have found a stack overflow post that says that Github does not process anything on the server-side (backend), however this is from 2018, so it is possible that things have changed. In the event that Github cannot host your site as per your requirements, note that there are various other free hosting services that you may find via a simple google search.