How can I browse a local html site? - html

I'm running into two issues trying to browse a local html site on firefox for testing:
When I try to make a link to the root (href="/"), firefox shows the macos root directory on a file browser
When I go to a directory, firefox shows a file browser rather than opening index.html
This seems to be fixed by uploading the site to the internet, but I'd like to be able to test the site locally without uploading it

Related

My site uploaded on Git hub doesn't load with CSS on net but it loads correctly with chrome on my laptop

I uploaded my own created personal site on Github (includes CSS and HTML only). The link doesn't open the site very well as my CSS contents doesn't get displayed but when I open the same file locally on my chrome browser it opens correctly.
Below I'm attaching the 2 screenshots of what it's like when I open.
1)With Github(Error while loading)
2)Locally opened using VScode(Correctly opened)
I was hoping that my uploaded file gets opened correctly like did in VScode so that I can share the link of my site.I am mentioning the link here too if anyone finds the fault then please help me rectify it.
https://dewansh28.github.io/PersonalSite/

HTML edits not showing

I’m working on a simple webpage with just an index.html file. If I make changes to the html file and then upload the file to my server, when I reload the page using the url with only http the changes I made show, for example, if I remove the index.html file and reload the page it says could not load page, not found. If I do the same thing but use https, the page still loads even if the index.html file is deleted from the server. I have deleted and cleared cache and website data from my iPhone. This seems to happen on iOS in both safari and Firefox on my iPhone but not on a computer. Does the https cache differently or store files in a different directory?

Blank page when uploading website files to web hoster

So I downloaded my own portfolio after making it through a portfolio maker and decided to download it, modify the html files to my liking and then wanted to upload them to a web hoster where I would use my own domain for it, however when I tried uploading my files to the main folder on my website's directory and check the website out it simply shows me a blank page, even though it actually displays my logo on the tab on top. When I open the index.html with Chrome from my local files it displays my website perfectly however when I upload it to my website and try view it that's when I get a problem. I have tried using 2 different web hosters and tried uploading my files through FTP and direct upload and still got the same blank page.
NOTE: I uploaded all the files in my site folder not just the index.html and if it works when I opened it with Chrome I don't see why it wouldn't work on my website.
It looks like you have forgotten to upload some files:
All the ones marked 404 are missing and need to be uploaded.

HTML object tag not displaying pdf file on localhost (XAMPP)

I want to display pdf file on web page with tag. It’s working well on normal directory and live server.
<object style="width:450px;height:380px" data="admissionform.pdf"></object>
Screenshot of Output in normal directory
But same file and same code when I replace it on localhost. The pdf file not displaying. The browser or download manager switching to download the pdf file.
Screenshot of Output in localhost
<object style="width:450px;height:380px" data="admissionform.pdf"></object>
Today I run my script on a localhost on a Linux desktop PC. And the pdf file is displaying well.
But still, Now I try to find out why my embed pdf with HTML object tag is not working in windows operating system

IMG won't show on remote site

I have a webpage where the images are not being found (running chrome). I synced the remote directory with my local one, so all files should be identical, however I can see the images locally but not on the remote site. Can anyone explain why?
I have the following directory where my index.html is:
icons/circle/*.png, where * is some generic social media i.e. (facebook, twitter, etc.)
using this code to show it on html
<img class="social-media" src="icons/circle/facebook.png">
But it only shows when I view my webpage locally, not when everything is uploaded to the server.
See webpage footer at dmacmill.com
Full directory listing:
Temp solution
I decided to just create another folder to hold all my icons, now they work for some reason. Still never found out the underlying cause of this.