Quick Nav:  Online Store   |   Login | Register

PB 3.x save as static file - for homepage?

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
OM
<50 Posts
Posts:28


04/06/2008 9:59 PM  

Hi John,

Is it possible to use the 3.x save page as static file function on the home page (where the only dynamic element is the menu, and that hardly ever changes) ... and if so, can that be used a method to bypass the slow DNN startup time?

However since I guess that it is PB that serves the static htm, so that means that PB must be loaded into memory and running .. ie the static page serve wont happen until after DNN has finished its load time anyway.  Is this correct?  Is there another way to use PB to avoid the slow DNN startup time?

Thanks,

OM 

Host Account
<100 Posts
Posts:83


04/07/2008 7:29 AM  
Yes, if you use the save as static file option on any page and the .htm is not mapped to ASP.Net in IIS manager (which is the default) then the default.htm page will be served directly by IIS and completely bypass the ASP.Net pipeline thereby avoid the startup lag.

In other words, once it is saved as an htm file it will not be delivered by PageBlaster.

FM
<50 Posts
Posts:40


04/07/2008 12:38 PM  
John, I'm having a problem with the save as static file.

I created a page called "blue". If I use the virtual path option I can create a virtual address that will work like this "/color/blue/default.aspx". It resolves ok.

However if I use the static option and name the file /color/blue/default.htm it does not work. Nor is there any static file that gets created in any directory.

Am I doing something wrong or is there some other problem?

Thanks
John Mitchell
Posts:3033


04/07/2008 12:44 PM  
Is this site running in a virtual folder? If so, you may need to add that as part of the path (but PageBlaster should be able to auto-detect that), otherwise maybe it is a permissions error.

If you turn on trace level="Debug" you can probably see the error in the trace file.
FM
<50 Posts
Posts:40


04/08/2008 7:43 PM  

Hi John

Still having problems with the static file option.   Firstly where does it save the html file because I searched everywhere and cannot locate one, is it a virtual file only?   Second, I can get it to work as a virtual path to a html file.   In other words, I can access a page with that name, however nothing is been parsed through, so the page itself is blank.

Looking into the source it does have code in it but nothing is being rendered on the page itself.   I even tried sending all .htm pages to the isapi dll but it did not make a difference.   

This is the HTML source from a blank page.


Attachment: 148441787554.txt

John Mitchell
Posts:3033


04/08/2008 8:30 PM  
The htm file should be saved in the same folder that you specify as the virtual path.

You don't want to have the .htm extension mapped to the aspnet_isapi.dll if you are using the save as static file feature since it defeats the purpose of saving the page as a static file. The reason to use this feature is so you can get a file that will be delivered directly by IIS and not have to go through ASP.Net which slows things down.

What you may want to do is just map all the image, css, & js extensions separately. However, this will then keep you from being able to have virtual-paths that do not end in a page extension.

In other words, the save as static file feature is one way to have virtual folder type Urls, or the other way is to create a wildcard mapping, but you can't do both.

That attachment has the actual server-side source of the default.aspx page so you may have a problem where aspx is no longer mapped to the aspnet_isapi.dll

OM
<50 Posts
Posts:28


04/10/2008 6:46 PM  

Hi John, I have purchased a license, but I'm still just testing how to use your module correctly, using localhost before I try it on a live server :)

When I choose the "save as static file" option, I have 2 problems:

- Sometimes shows the gzipped text on IE6, not the html eg the page just shows the string "H4sIAPvPa08A...(etc)".  Seems to be fixed by removing the 2nd exclude path (ctl[/=] etc)..

- Seems to be showing the cached page, not the static page - if I edit the .htm file that was created and add an extra "hello world", my localhost still shows the previous text, without hello world (even after I clear the browser cache).  If I open the edited html directly, then I can see hello world.

Any ideas?

 

 

OM
<50 Posts
Posts:28


04/10/2008 6:51 PM  

Btw, the rules that move JS, merge CSS and JS files are working really well - cuts down the number of requests and the total bytes sent very very nicely.  I'm quite happy with this part :)

OM

John Mitchell
Posts:3033


04/10/2008 10:17 PM  
I'm not really following what exactly is happening. Can you give me a few more details on how you are saving the static file? Also, when you save it as a static file, you will need to go to the dynamic page and do a hard refresh before it will get updated, otherwise the static html file will only be delivered by IIS and which will not be able to change it dynamically.
OM
<50 Posts
Posts:28


04/11/2008 1:24 AM  

Hi John,

I wasnt sure if it was using the static file or not, so I made a change to the static htm file (not the DNN page). 

When I opened the page from the DNN menu, it did not show the change, but when I open the static.htm file I can see the change.  How can I check if it is using the static file or not?

Thanks

OM
<50 Posts
Posts:28


04/11/2008 3:55 AM  
I wanted to try this on a site that isnt so important - so I uploaded it to an old 4.3.4 site, but the PB menu item was not added to the admin menu - so I cant make any settings or set the license key etc. I checked the Tabs table and there is no PageBlaster Tab under the admin menu. Is there a minimum DNN version for PB 3.x?
John Mitchell
Posts:3033


04/11/2008 7:30 AM  
When you save a page as a static file that is all it does, it puts a snapshot of the page in the folder you specify. Now any requests to that folder are handled directly by IIS and DNN does not really even know the file exists. If you want the DNN menu to navigate to the static file then you will need to put in a replacement rule to change the links in the DNN navigation.

If you want to be sure that the static file is updated then you can delete it manually and DNN will recreate it if it isn't there.
The reason PageBlaster does not overwrite the file is because DNN shares portals between different virtual websites, and I didn't want and administrator from one portal to be able to overwrite the file of another.

PB should work on a 4.3.4 site, but I haven't had a chance to test it there yet. There may be a problem with the SQL script to add the menu item. I'll look into this.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >PageBlaster > PB 3.x save as static file - for homepage?



ActiveForums 3.7
Powered by: Snapsis Software