Quick Nav:  Online Store   |   Login | Register

Caching pages with DNN Blog module 'Permalink' URLs

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
eoghan o'neill
<50 Posts
Posts:22


03/08/2008 4:53 AM  

I have a lot of pages on my website that use the DNN Blog module. I also have the free version of PB installed (although I have bought the paid version of PB) on my DNN 4.5.5. install (which is in a shared hosting environemnt).

One of the ways I am checking to see if the blog pages are being cached by PB is to see if the random text in the CAPTCHA image on the 'add a comment' part of the blog page is the same when either (a) I access a blog entry using different browsers or (b) when I hit F5 to refresh the page in the browser. The behaviour I am seeing is making me doubt if I the page is being cached by PB as it should be. Typical examples are:

  • If I open a blog entry as an unauthenticated user in one browser (e.g. Firefox) and then go immediately and open exactly the same page in another browser (e.g IE7 or Opera), also as an unauthenicated user, I notice that different text apears in the CAPTCHA in the other browser.
  • If I then refresh (F5) this page in Firefox or IE7 the CAPTCHA text does not change (it only cahnges if I hit CTRL + F5 which is the behaviour I would expect of PB). However when I hit F5 in Opera the text in the CAPTCHA image does change.

My first question I suppose is:

  • Am I right to assume that the text in the CAPTCHA image will be the same across differetn browsers if the page is being cached by PB?

If the answer to that is 'yes' it looks like I am having a problem and will add details on my PB config file settings to see if there is something I should change.

Thanks.

eoghano

John Mitchell
Posts:2779


03/08/2008 9:34 AM  

Hi eoghano,

With the CAPTCHA image on the blog module it is a seperate request to the server.  The image will not display correctly unless it is excluded from PageBlaster.

If you look in your config file you might see that captcha is in the list of exclusions. If it is not then I'm not sure how it is working.

Also, when you click on the link to look at comments it does a POST back to the server. Anytime there is a post-back PageBlaster will disable caching assuming that you are sending data that requires an update to the cache.

eoghan o'neill
<50 Posts
Posts:22


03/08/2008 1:51 PM  
Thanks John for the quick reply.

I checked and CAPTCHA was not in the list of exclusions in my PB config file. I added it and then the CAPTCHA image was no longer visible on any of the blog pages (I got the missing graphic icon). So I removed Capthca from the exclusion list, restarted the full app and all was fine again. So my exclusion list is now as follows:

path pattern="(\.asmx|\.axd|\.asxh|rss|fck|admin|install|thumb|wizard|cart)" excludeFrom="All"

The blog pages - and their comments function - have been working perfectly - with PB on the server - for months now. The response headers of a blog page indicate PB is in place (sample below) :

Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Content-Encoding: gzip
X-Snapsis-PageBlaster: v:2.2.4;c:-;x:+;r:+
Set-Cookie: DotNetNukeAnonymous=d4120d6f-a673-4696-b3e4-91afef80959f; expires=Sat, 08-Mar-2008 19:04:05 GMT; path=/; HttpOnly
language=en-US; path=/; HttpOnly
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Content-Length: 12267

What is not clear to me is how the CAPTCHA should be working if PB is caching a blog page? Should all unauthenticated requests for the cached blog page serve up a CAPTCHA image requesting the same CAPTCHA text to be typed in? Or will the CAPTCHA text change for each instance of an individual cached page that is retrieved from the cache? It's not clear to me. Any insight would be helpful to have a better understand of the nuances of PB (in advance as well of installing the full paid version on my server.

Thanks.

eoghano

PS - I did not click on the link to look at comments as I knew if did a POST back to the server, instead I scrolled down each time.

John Mitchell
Posts:2779


03/08/2008 2:00 PM  

That is strange, but if it works without being excluded then that is good.

The captcha image is not actually a part of the page, it is a separate request from the browser to the server just like with images, css, & js files.

In PB 2.2.4 only the page output is cached, not any of the other external files that may be linked in.

If you navigate to your blog article using a GET request (like clicking on the blog title link) and watch the response headers you will see the c: variable change to show the page is caching, c:- means it was not in cache, c:d means it was in disk cache, and c:m means it came from memory.

eoghan o'neill
<50 Posts
Posts:22


03/10/2008 4:21 PM  

John,

Following your advice to watch the response headers I have worked out - I think - what the problem is.

The DNN Blog module uses two different URL structures for a blog entry depending on where the link is. For example, the blog title link has the following URL structure:
http://www.example.com/DNN/Blog/tabid/80/EntryID/539/Default.aspx

When I click on this sort of link the response headers tell me "c:m" meaning that the page came from memory but the CATPCHA image comes up as 'image not found'

However precisely the same blog entry can also be accessed via its "Permalink" which has the following URL structure:
http://www.example.com/DNN/Default.aspx?tabid=80&EntryID=539
When I click on such a Perma link the response headers tell me "c:-" meaning that the page was not cached however but the CATPCHA image comes up fine.

The excludepaths section of my PB Config reads as follows:

path pattern="\?(?!tabid)" excludeFrom="All"
path pattern="(\.asmx|\.axd|\.asxh|rss|fck|admin|install|thumb|wizard|cart)" excludeFrom="All"
path pattern="ctl.*?(edit|module|tab)" excludeFrom="All"
path pattern="discussion" excludeFrom="Caching"

Is there anything I need to change to get pages with a Permalink URL cached and to get the CAPTCHA image appearing on the non Permalink URL pages?

Thanks

eoghano

eoghan o'neill
<50 Posts
Posts:22


04/01/2008 7:46 AM  

Hi John,

Any ideas on this problem with blog entries on the DNN Blog module that use the Permalink URL structure? I haven't been able to solve this myself since I posted the message above.

Thanks

eoghano

John Mitchell
Posts:2779


04/01/2008 12:02 PM  

To insure that the CAPTCHA image works correctly you can include it in the main list of excludes:

\.asmx|\.axd|\.ashx|rss|captcha|fck|admin|install|thumb|wizard|cart

 

Also note that the .asxh was a typo in the original config and should be .ashx

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 > Caching pages with DNN Blog module 'Permalink' URLs



ActiveForums 3.7
Powered by: Snapsis Software