Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.Net Help needed to remove Cookie and header information from Static files (js/css/images)

Posted on 2013-11-12
3
Medium Priority
?
238 Views
Last Modified: 2014-03-03
I have a web application which passes cookie and other information in header. This information is also added to static files which i need to remove.

As part of Yslow recommendations additional header information including cookies should be removed from static files.

I know this is possible to achieve by creating a cookieless sub domain and rendering the static files from there. But this is not feasible solution for my application and client.

Please advise
0
Comment
Question by:samlitu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1500 total points
ID: 39643779
Then you can't 'remove' cookies.  Cookies that are set on your domain are Always passed back in every request to that domain.  That is part of how browsers make requests for not just pages but images, css files, and javascript files, everything that comes from that domain.  That is why the recommendation is to use a 'cookie-less' subdomain.

But if you can't do it, don't worry about it.  It's not going to be a huge slow down for your pages.  Some of Yahoo's and Google's 'recommendations' can only be used by sites that control their own servers and have lot of resources.  A lot of the recommendations can't be followed on shared hosting because you don't have control of the server.
0
 

Author Comment

by:samlitu
ID: 39643802
Thanks Dave. Will writing httpmodule and handling cookies would help? I am not sure if this would add to page load time as i need to parse the file type and remove cookie and header information.

Any other thoughts..?
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 1500 total points
ID: 39643836
You can't remove any cookies that have been set in the browser.  It's simply not your choice.  Once the cookies have been set like for ASP Sessions and applications, the browser will continue to send them with HTTP requests until they expire.  See here about cookies: http://en.wikipedia.org/wiki/HTTP_cookie#Setting_a_cookie

And the interaction between client browsers and the web server is done by the browser sending a Request header and the server replying with a Response header and the content.  If you were actually able to remove all header information, your web site would stop working.  This page describe the headers that a browser may send with a request: http://en.wikipedia.org/wiki/List_of_HTTP_header_fields  Note that NONE of those are under your control.
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question