RTC Forums
November 24, 2024, 05:31:49 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
css file with IE11
Pages: [
1
]
« previous
next »
Print
Author
Topic: css file with IE11 (Read 4528 times)
mteirek
RTC Expired
Posts: 9
css file with IE11
«
on:
June 06, 2015, 01:08:56 AM »
i try to build a web application using javascript Framework.
1- i installed the RTC_WebServer ( demo program ) on a Windows server 2008 r2
2- i am working with shield ui Framework
i put css file + 2 js files on the server
file1- <link id="themecss" rel="stylesheet" type="text/css" href="all.min.css" />
file2- <script type="text/javascript" src="jquery-1.11.1.min.js"></script>
file3- <script type="text/javascript" src="shieldui-all.min.js"></script>
with Chrome no problem ( css file and js files) are received by the client (chrome) and code in the webpage work nice
with IE11 the css file dont work ( not sent or sent partialy ?). IE11 dont use it
same code work fine in IE11 and chrome if i use a public cdn
file1- <link id="themecss" rel="stylesheet" type="text/css" href="//www.shieldui.com/shared/components/latest/css/light/all.min.css" />
file2- <script type="text/javascript" src="jquery-1.11.1.min.js"></script>
file3- <script type="text/javascript" src="shieldui-all.min.js"></script>
server-headers problem ?
any idea ?
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: css file with IE11
«
Reply #1 on:
June 07, 2015, 05:43:10 PM »
Chrome is obviously smart enough to determine the content type when downloading a file with CSS extension, but some browsers aren't. To make sure all Browsers will know what to do with the content received, you need to explicitly set the Content-Type HTTP header for all files used by Web Browsers. In the RTC WebServer Demo, that can be done easily by adding CSS to the list of content types on the Main Form. And when you need to write your own code for sending out files to Web Browsers, use the
Response.ContentType
or
Response['Content-Type']
property on the
TRtcDataServer(Sender)
component to prepare the content type HTTP header before sending out the response with the
Write
or
WriteEx
method.
Best Regards,
Danijel Tkalcec
Logged
mteirek
RTC Expired
Posts: 9
Re: css file with IE11
«
Reply #2 on:
June 08, 2015, 12:35:08 PM »
work fine with :
if ExtractFileExt(qfilename) = '.css' then begin rdsServer.Response.ContentType := 'text/css'; end;
thanks
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...