[interchange] Add new pragma url_no_session_id to suppress session IDs in generated URLs

Jon Jensen <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
commit 95a07a5881a1431cea15065801aceb963724db79
Author: Jon Jensen <[email protected]>
Date:   Tue Jan 18 18:30:38 2011 -0700

    Add new pragma url_no_session_id to suppress session IDs in generated URLs
    
    For any site that already requires cookies to function, you can add this
    pragma to the catalog:
    
        Pragma url_no_session_id
    
    To disable in a particular page or template file:
    
        [tag pragma no_image_rewrite 0][/tag]
    
    It ensures that Interchange-generated URLs won't include mv_session_id,
    id, or mv_pc URL query string parameters.
    
    This is mostly of interest for search engine optimization (SEO) purposes,
    but is also helpful for making more pages cacheable by a proxy, etc.

 lib/Vend/Util.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/Util.pm b/lib/Vend/Util.pm
index ed4a1c7..7e2860c 100644
--- a/lib/Vend/Util.pm
+++ b/lib/Vend/Util.pm
@@ -1277,7 +1277,7 @@ sub vendUrl {
 	$ct = ++$Vend::Session->{pageCount}
 		unless $opt->{no_count};
 
-	if($opt->{no_session}) {
+	if($opt->{no_session} or $::Pragma->{url_no_session_id}) {
 		undef $id;
 		undef $ct;
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.