Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sveltekit tutorial spams downloads on Firefox #476

Open
Brandon-Perry opened this issue Aug 9, 2023 · 1 comment
Open

Sveltekit tutorial spams downloads on Firefox #476

Brandon-Perry opened this issue Aug 9, 2023 · 1 comment

Comments

@Brandon-Perry
Copy link

On: https://learn.svelte.dev/tutorial/headers

When you're typing out the code in the instructions, once you get to 'text/plain' the browser will start spamming downloads of the contents in the iFrame (i.e. if you have "this is a bug" it will download a file with that text in it).

I couldn't replicate this in Chrome

Replication:

copy and paste this into src/routes/+page.server.js

export function load({setHeaders}) {
// set headers
setHeaders({
'Content-Type': 'text'
})
}

In my browser, the page begins reloading constantly at this point.
If you add a '/' at the end of 'text' it will start downloading constantly.

I've noticed that if I paste the entire solution, or preempt the setHeaders({...}) part with a return after it, the issue doesn't happen.

@souvikmishra
Copy link

Happened to me too, kinda freaked me out tbh. This behavior also removes focus from the window itself i.e. you cannot type in the editor, so I had to close the browser and came straight to this issues section to check if anyone else also faced this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants