Tag Info

New answers tagged


The solution was rather special. The server had the default mime-type application/octet-stream for PDF files. After changing this to application/pdf everything worked fine. In the lighttpd configuration I achieved the change by adding this definition: mimetype.assign += ( ".pdf" => "application/pdf" )


See How to force files to open in browser instead of download (pdf)? which has an answer from ColinM that tells you exactly what the headers should be: To indicate to the browser that the file should be viewed in the browser: Content-Type: application/pdf Content-Disposition: inline; filename="filename.pdf" To have the file downloaded rather than ...


Basically, you want to get to a point where your HTML page is the same for all users, regardless of their configuration. This is only really possible if you can apply all of the customisation with javascript. To continue your example, let's say you allow users to customise the background colour of the page, and this choice is stored in a cookie. If you ...


My question is why. Why use .html when you can use friendly URL's instead? Anyways, technically, you could but the important thing that determines how the browser handles the data is the HTTP content-type header. In a standard HTML document, the content type header will contain at least this: Content-type: text/html Some may go as far as this in order ...

Top 50 recent answers are included