Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
cmankowski
Posts: 8
Registered: ‎02-17-2009
My Device: Not Specified

Confused by Content-Location and Content-Type

When is it appropriate to set Content Location versus Content Type?

 

I read that Content Location can be set to file://some/path but does that mean Content Type must be set?

 

What is the benefit of setting Content Type?  When do I use it?

Please use plain text.
Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: Confused by Content-Location and Content-Type

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.14

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17

It's always a good idea to set the Content-Type. You usually don't need to set the Content-Location unless you're serving content from a different location than requested.
Please use plain text.
New Developer
cmankowski
Posts: 8
Registered: ‎02-17-2009
My Device: Not Specified

Re: Confused by Content-Location and Content-Type (RIM vs PAP vs Message push)

I may be confused here.  I'm referring to the Blackberry Content Developer's guide Chapter 6.

 

I'm doing a RIM Push and don't know if ContentLocation and Content Type are mutually exclusive.  Here is what I found:

Content-Location seems to be used to redirect an end user to a website.

Content-Type is used in CachePush, or to embed direct HTML into a push message

 

If Content-Type is used at all, it would seem that Content-Location would be or should be ignored.

 

Does this make sense?

Please use plain text.
Administrator
MSohm
Posts: 14,569
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook

Re: Confused by Content-Location and Content-Type (RIM vs PAP vs Message push)

The Content-Location refers to the location of the content (its URL).  Content-Type refers to the type of content you are pushing. 
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.