Page not displaying?

I uploaded a simple html and css. But when I click the deployment, it shows default demo page?
No description
62 Replies
Chaika
Chaika•12mo ago
Index shouldn't be capitalized, Pages may be upset about that, what's the deployment url?
Mercy
MercyOP•12mo ago
test-dgj.pages.dev ill change index and try..
Chaika
Chaika•12mo ago
yea for me that works If I go to Index directly
No description
Mercy
MercyOP•12mo ago
oh..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?
Chaika
Chaika•12mo ago
it should be index.html and that will be the "default"
Mercy
MercyOP•12mo ago
😢
No description
Chaika
Chaika•12mo ago
You created a new pages project? You could just make a new deployment
Mercy
MercyOP•12mo ago
oh..i deleted and uploaded a new one
Chaika
Chaika•12mo ago
Did you rename it to index.html ?
Mercy
MercyOP•12mo ago
yes
Mercy
MercyOP•12mo ago
No description
Chaika
Chaika•12mo ago
Interesting.. it's confused about its content type works fine locally I assume? What do the assets uploaded for that look like?
Mercy
MercyOP•12mo ago
works fine local
No description
Chaika
Chaika•12mo ago
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
Mercy
MercyOP•12mo ago
no that project is still there: testing-1ji.pages.dev oh..not valid?
Mercy
MercyOP•12mo ago
No description
Chaika
Chaika•12mo ago
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
Mercy
MercyOP•12mo ago
did it again..but still same...
No description
Chaika
Chaika•12mo ago
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?
Mercy
MercyOP•12mo ago
folder so..it works when you upload it? thats strange..
Chaika
Chaika•12mo ago
Not sure if it matters or not, but are you on Windows using a supported browser like Firefox/Chrome?
Mercy
MercyOP•12mo ago
No description
Chaika
Chaika•12mo ago
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
Mercy
MercyOP•12mo ago
ok ill try that
Chaika
Chaika•12mo ago
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
Mercy
MercyOP•12mo ago
testzip.pages.dev looks blank to me..
Chaika
Chaika•12mo ago
guessing you zipped using some utility which put everything under a folder? what does the uploaded files look like?
Mercy
MercyOP•12mo ago
No description
Chaika
Chaika•12mo ago
yea it's all under test https://testzip.pages.dev/test/
Mercy
MercyOP•12mo ago
oh is it because foldername is test? any way to remove "test" at the end....?
Chaika
Chaika•12mo ago
I think Windows just does that. If you try a normal folder deployment now, any luck?
Mercy
MercyOP•12mo ago
still displays html text 😢
Chaika
Chaika•12mo ago
I mean one for that existing project, not a new one
Mercy
MercyOP•12mo ago
James
James•12mo ago
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.
Mercy
MercyOP•12mo ago
oh ok, ill try with chrome
Chaika
Chaika•12mo ago
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
James
James•12mo ago
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
Mercy
MercyOP•12mo ago
i guess im lucky
Chaika
Chaika•12mo ago
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
Mercy
MercyOP•12mo ago
oh ok. i don't have github setup but ill try that...might take a day or two though
Chaika
Chaika•12mo ago
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
Mercy
MercyOP•12mo ago
oh yeah chrome uploaded from chrome: test2-3td.pages.dev
Chaika
Chaika•12mo ago
my god it works
Mercy
MercyOP•12mo ago
oh still blank for me
No description
Chaika
Chaika•12mo ago
just dns cache
Mercy
MercyOP•12mo ago
nvm it works cloudflare hates firefox i guess
James
James•12mo ago
If you can ever find a reliable reproduction for this, pages team will love you haha
Chaika
Chaika•12mo ago
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
James
James•12mo ago
Glad it’s working for you now Mercy!
Mercy
MercyOP•12mo ago
thanks. everyone
Chaika
Chaika•12mo ago
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
Mercy
MercyOP•12mo ago
maybe addon? i use ad blocker
James
James•12mo ago
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 😅
Chaika
Chaika•12mo ago
Are you sure it doesn't? The client calls an upload endpoint with all of the content types
Chaika
Chaika•12mo ago
No description
James
James•12mo ago
I was sure… but apparently very wrong. Wow okay that makes so much more sense
Chaika
Chaika•12mo ago
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
James
James•12mo ago
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
Mercy
MercyOP•12mo ago
early Christmas present
danilotallaric
danilotallaric•12mo ago
What should I put in the worker.js file to make my html site work?
Want results from more Discord servers?
Add your server