Temporary files created for publishing

Issues related to previewing and publishing your web site.
Post Reply
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Temporary files created for publishing

Post by WWBman »

I've just noticed that the temporary files created for publishing in
"C:\Users\...\AppData\Local\Temp\~publish\"
are not removed although the publish displays "Removing temporary files..." before it ends.

Is this intentional?
User avatar
Pablo
 
Posts: 21707
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Temporary files created for publishing

Post by Pablo »

Yes, this is intentional.
The files will be removed the next time publish.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Temporary files created for publishing

Post by WWBman »

Is there a disadvantage in removing them immediately after publishing?
User avatar
Pablo
 
Posts: 21707
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Temporary files created for publishing

Post by Pablo »

Basically, publishing works the same as preview.
if the files were immediately removed then you would not be able to preview.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Temporary files created for publishing

Post by WWBman »

Pablo wrote: Fri Dec 31, 2021 4:23 pm Basically, publishing works the same as preview.
if the files were immediately removed then you would not be able to preview.
I thought wwb generated the required files before each preview or publish.
User avatar
Pablo
 
Posts: 21707
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Temporary files created for publishing

Post by Pablo »

Correct.
alan_sh
 
 
Posts: 1695
Joined: Tue Jan 01, 2019 5:50 pm

Re: Temporary files created for publishing

Post by alan_sh »

WWBman wrote: Fri Dec 31, 2021 4:54 pm
Pablo wrote: Fri Dec 31, 2021 4:23 pm Basically, publishing works the same as preview.
if the files were immediately removed then you would not be able to preview.
I thought wwb generated the required files before each preview or publish.
Let me see if I get this right. If you publish, WWB removes any old html code from the temp location, creates the new html code and then copies it to the correct location. It then exits. In Preview, it uses the same routines to create the code, passes the location to the browser and then exits.

So, if WWB was to delete the code after it exits the routine to create it, Preview wouldn't work (and probably, publish would fail too unless specific code was there to check what you'd asked it to do - preview or publish).

For me, this all works well, because sometimes I want to use a different browser to preview my work and I know the html code is in my temp folder waiting for me.

I hope this all makes sense and I haven't been over simplifying things.

Alan
User avatar
Pablo
 
Posts: 21707
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Temporary files created for publishing

Post by Pablo »

Correct!
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Temporary files created for publishing

Post by WWBman »

I was going to leave this but.
You would normally do many Previews before Publishing so obviously you don't need to have Published to do a Preview.
I always specify my own Preview Folder in Options > Files and Folders but I don't think this is relevant.

This is how I thought it worked.
Preview always first deletes all files in the Preview Folder and then creates all the files necessary for the Preview.
Publish always first deletes all files in the Publish Folder (which in my case is different to the Preview Folder) and then creates all the files before Publishing them.
So, if WWB was to delete the code after it exits the routine to create it, Preview wouldn't work (and probably, publish would fail too unless specific code was there to check what you'd asked it to do - preview or publish).
Since WWB creates all files each time a Preview or Publish is done I don't think this would apply.
For me, this all works well, because sometimes I want to use a different browser to preview my work and I know the html code is in my temp folder waiting for me.
The same applies to this.

So the fact that WWB does the file creation each time is why I suggested the deletion afterwards.

I stand corrected if anything is not how it is.
Apologies for continuing this thread (I didn't intend to!).
Post Reply