Page not displaying?
I uploaded a simple html and css. But when I click the deployment, it shows default demo page?
62 Replies
Index shouldn't be capitalized, Pages may be upset about that, what's the deployment url?
test-dgj.pages.dev
ill change index and try..
yea for me that works If I go to
Index
directlyoh..i tried with "index" but dind't work but works with "Index" didn't know capitalization mattered in URL... might be a dumb question...but is there a way to make it "index" a default home page? instead of typing index at the end?
it should be
index.html
and that will be the "default"😢
You created a new pages project? You could just make a new deployment
oh..i deleted and uploaded a new one
Did you rename it to
index.html
?yes
Interesting.. it's confused about its content type
works fine locally I assume? What do the assets uploaded for that look like?
works fine local
Did you just delete that project too? lol
I would guess for some reason the direct upload doesn't think that's html, either it's not valid or something else
no that project is still there:
testing-1ji.pages.dev
oh..not valid?
opps I was misspelling it
If you click on the project, you get to the deployments screen. You can click "create new deployment" and drag and drop again
did it again..but still same...
The reason why that's happening is because CF serves headers for nosniff/telling the browser not to guess the content-type, unlike it will with local files, and Pages is also not serving a content-type, so the Browser is just falling back to text
curious though, I've never looked into how Pages determines content types before, I assumed it was entirely just off extensions, 1 sec
hmm I can't repro, works fine if I upload either folder or zip with those files: https://513e28a8.quick-test-new.pages.dev/
Are you selecting a folder or zip uploading?
folder
so..it works when you upload it? thats strange..
Not sure if it matters or not, but are you on Windows using a supported browser like Firefox/Chrome?
Pages takes the assets you first upload and uploads them along with the content types it guesses for them
I would try zipping and uploading the zip in a brand new project
ok ill try that
or you could install the Wrangler CLI and npx wrangler pages deploy (https://developers.cloudflare.com/workers/wrangler/commands/#deploy-1), that's more involved though, although I'd wager that has a better chance of working since it has its own logic for all of this and is more inline with how Git based projects are built
testzip.pages.dev
looks blank to me..
guessing you zipped using some utility which put everything under a folder?
what does the uploaded files look like?
yea it's all under test
https://testzip.pages.dev/test/
oh
is it because foldername is test? any way to remove "test" at the end....?
I think Windows just does that. If you try a normal folder deployment now, any luck?
still displays html text 😢
I mean one for that existing project, not a new one
this one?
https://testing-1ji.pages.dev/
There’s a longstanding rare issue when uploading with Firefox and the content type gets messed up. I’d recommend testing with another browser just to rule that out.
oh ok, ill try with chrome
funny because I tested and it worked fine for me via Firefox lol.
Thanks for pointing that out, super strange
I meant for the testzip one
Yeahhh it’s a very weird one that’s been there for years. No one has been able to reliably reproduce but I see it every so often
i guess im lucky
That still looks like the zip deploy and not a folder one, everything's still working under /Test/
If you have no aversion to using a Github Repo, Pages is much better that way and wouldn't suffer this issue lol
oh ok. i don't have github setup but ill try that...might take a day or two though
If you just want to get it up quick I'd follow James advice, and create a new project via Chrome and folder upload
with any luck that'll be the right combo lol
oh yeah chrome
uploaded from chrome:
test2-3td.pages.dev
my god it works
oh still blank for me
just dns cache
nvm it works
cloudflare hates firefox i guess
If you can ever find a reliable reproduction for this, pages team will love you haha
well it took a bit but we got there lol, thanks for your patience. I hadn't seen that before.
but yea, for the best experience Github or Gitlab with Pages built in CI/CD is recommended. Automatic builds and nice stuff
Glad it’s working for you now Mercy!
thanks. everyone
lol I downloaded the exact files and uploaded them as a folder in the same Firefox version he's using, not sure what else is diff
maybe addon? i use ad blocker
It’s a wild one. The client doesn’t do the mime type computing - that’s purely on the server based on file extension, but we’ve only ever seen it happen on Firefox, and mostly windows if I recall
No rational explanation 😅
Are you sure it doesn't? The client calls an upload endpoint with all of the content types
I was sure… but apparently very wrong. Wow okay that makes so much more sense
I noticed too it only does it on the first upload of each unique file it seems, so my silly idea was to get them right via zip and then folder upload
but I guess that idea failed because the automatic root detection stuff is weird
Very interesting 🤔
Now I’m very intrigued as to where this is failing in Firefox so randomly. I’ve never seen that req before, dang, good catch
early Christmas present
What should I put in the worker.js file to make my html site work?