Hey guys so in my last post I explained how the landscape for the app it makes wasnt working but now I have another problem. By default the home page updates whenever you make an update or change but the install web page doesn’t. I am having a hard time finding where the pages are stored I changedthe package.json main but it had no affect. I copyied the index.hrml file and its whole entirety and the page still doesnt have that clean autoreload on update by default. Plus another issue is there are buttons like the install button that when pressed send you to a new page but I dont even see that in any of the code I have looked through one might think its a button dgb it uses js when you click it but I see legit nothing that references it in the js files. It could very well be that the files I need to edit are files I can’t access
You know its bad when dgb pulls out a whole essay
so far the only real solution I have had was to just put everything on the index page but that would be inefficient for users
a whole 24 hours without a reply or a heart is everyone gone or busy :((
Hey, I’m having a bit of trouble understanding your issue, plus, it would help if you shared some code.
Alreeady shared didnt I?
This is the template im using
Can you share the code that’s giving you issues? You mentioned something about the homepage refreshing, could you share the code that’s doing that?
If I knew where the issue was I wouldnt be here lol
if you read my big essay you will understand
I can always dumb it down if needed
I’ve read through it. Is your first issue the fact that your app doesn’t update when you make code changes in the editor?
where is auto updating code stored @
yeah only the home page is updating
The code that pushes the code from the editor in your browser to the website?
yeah its not pushing on other pages besides the home page/index html
My best guess is that the pages are being cached on your device when you view the web page. That being said, I don’t know a lot about PWAs and how browser caching will vary.
Can you try clearing your browser cache?
I was using the mobile app PWA to test but a reload updates the site
So reloading fixes the issue? Or just on the home page?
I can just reload the page to see the update as normal but I want to use the auto update/auto reload that the home page is using
if you mess around with the template I sent you will see that when you mess around with the H1 or anything on the page the site will automatically reload and update my goal is to have it do that automatically for all pages not just the home page
Ok, so you want the homepage plus all of the other pages to reload upon a change in the editor?
well yeah I guess like when I update about.html or any other page Id like to use the same propertie that updates it instantly for all so yeah
sorry for the wait just had to make sure that when the user has no wifi it doesnt update and just boot them off with a no internet connection screen
I can’t think of anyway to do that without using the Glitch API (which is private at the moment, no docs) to listen for changes. Sorry about that.
yeah I figured I had someone else take a look at it and say something similar
If you want, you could speak with Glitch support to see if they have a solution/workaround for this.
Additionally, you could create code to auto reload your page every x seconds.
I guess your right I could gave it auto refresh
looks like this template relies on vite to mange its own auto-refresh. this happens on index.html through this process:
- vite does whatever special dev build it does
- that build includes some extra js code
- the js code opens a web socket to the vite dev server
- later the vite dev server sends a websocket message to inform the page to refresh itself
- the glitch editor doesn’t do anything
but for install.html, there’s a different situation
- it’s in the public/ folder, where there’s no build process. they’re only served as static files
- there’s no extra js code added to it
- there’s no code to tell the page to refresh itself
- the glitch editor also doesn’t do anything
- nothing happens
you’ll probably have to look into getting vite to “build” another page rather than putting it in the public/ directory
yo thank you I didnt think of trying to move the file you are a G
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.