Can Large External JavaScript Files Slow Down The Page Load Time
Aug 4, 2010
When we include Javascript files in our aspx files. either we write all the Javascript code in the Head section of aspx or we link to an external Javascript file.
So when the clinet makes a call to that page. Does that mean that all the Javascript will be loaded on the client side?
If that is the case then does not that mean that it will slow down the loading of page as all the Javascript has to be loaded on the client machine?
View 3 Replies
Similar Messages:
Feb 4, 2010
I have an asp.net web page to serve large file downloads to users.
The page is hosted on IIS7, Windows Server 2008.
The strange thing is that users can download at good speeds (2MB/s) when I don't add a content-length response header but as soon as I add this header, download speed drops to somewhere around 35kbps/s.
This is the code:
[code]...
Of course I can leave the content-length out but the user will not know how big the file is and how long the download will take...which is annoying.
View 1 Replies
Mar 6, 2010
I have web application where i want to show pdf files in web page. in my page there are 5 pdf files i have to show at a time.it's taking much time to load page. and also user has to wait until all files are loaded in page.is there any free components to show pdf files.
View 3 Replies
Feb 1, 2010
I have a .swf file embedded in my asp.net webpage. It is slow to load although the size of the file is 1.60 mb. What might be the reason for the slowness? Is there a way I can speed it up in asp.net?
View 1 Replies
Jun 14, 2010
it's possible to load external CrystalReports (2008) .rpt files?
I now embed them so they're compiled with my core.
It would be nice if i can make changes to a reports layout without having to recompile anything. Is that possible?
View 1 Replies
Dec 20, 2010
We have an asp.net website running on IIS 6 Windows 2003. When ever we upload a class file to the App_Code folder our whole site goes down temporarily until, what I assume, compilation is complete. Has anyone else experienced this? Any other file we upload it does not do this only our class files.
View 1 Replies
Jun 1, 2010
I used this sample to work around the issue we were having with large files. [URL] Unfortunately, when I attempt to download large files of 30MBs or more, the download times out and the user gets a partial download. It doesn't seem to be a consistant percentage of the download either. I attempted to download a 50MB file and got to 33MB. When trying a 30MB file, I downloaded 24MB.Below is my code.
if (File.Exists(strFilePath))
{
fileName = System.IO.Path.GetFileName(strFilePath);
Response.Clear();
system.IO.Stream iStream = null;
byte[] buffer = new Byte[10000];
int length;
long dataToRead;
try
{
iStream = new System.IO.FileStream(strFilePath, System.IO.FileMode.Open,
System.IO.FileAccess.Read, System.IO.FileShare.Read);
dataToRead = iStream.Length;
//FileInfo file = new FileInfo(strFilePath);
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Length", iStream.Length.ToString());
Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName.Replace(" ", string.Empty));
while (dataToRead > 0)
{
if (Response.IsClientConnected)
{
length = iStream.Read(buffer, 0, 10000);..................
View 3 Replies
Mar 27, 2011
I have a C# assembly that loads external files. This assembly is used by asp.net website. The following is the code that loads the data files
string dataDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),"data"); filePath = Path.Combine(dataDirectory,_fileName);
The component works fine in a windows app, but when I tried to use it in an asp.net website, it fails as the site could not find the data files. And it gives me the following error:
C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Filescmictranslatorsite20a8eddd864b2575assemblydl35bd4a35e8c6f79b6_98eccb01datafile.txt
View 1 Replies
Oct 10, 2010
I have an external JavaScript in an asp.net 3.5 project. While writing different functions, sometimes the JavaScript is loaded into FF and sometimes it is not (based on FireBug) and the JavaScript does not run.
Even if there is an error in the JS it should still load or be visible to the browser, right?
What is the logic behind when it is loaded and when it doesn't load (or is accessible to the browser?)
Master Page loads JS from a script directory in project:
[code]...
View 1 Replies
Mar 4, 2010
I have a code like
var mySession = "<%= Session["MyID"] %>";
alert ( mySession );
and when I place this code in my aspx page inside a script tag, it works fine. But it doesn't work in an external js file. I am not able to figure out the problem.
Is there anything wrong in my code, or is it like this by default?
View 3 Replies
Jun 7, 2010
I'm using visual studio 2010 professional. I have my javascript files in a subdirectory called javascripts where I am holding all those files respectively. I am constantly having to remove (from the head section) the external javascript link. Then rename the javascript file in the javascript's folder, then re-add the external file back to the head section again. The reason of having to do this is somethimes when I am editing the js file, and then go to test it, the aspx page doesnt seem to see the code anymore. I've tried different browsers, closing the window and reopening, deleting temp int files, but all to no success. Has anyone else had this happen, is there a better workaround??if i open the js file in the browser, the functions are showing properly.
View 2 Replies
Jan 22, 2010
I'm writing a simple web site using codebehind for each page, however using the "codefile" directive, not "codebehind" as such, because I'm not precompiling. I'm just using a text editor to edit the aspx and codebehind files. Problem is, every time I make a change to the code or the aspx file, and refresh the page in the browser, it takes a 2 or 3 seconds to come up the first time, like it's doing an on-demand initial compile. I assume that's what it's doing, as after the initial load, the page refreshes without any delay at all.
This behaviour is quite frustrating when making small changes to the html or code. I'm coming from classic ASP, where you could edit-refresh-edit-refresh etc. all day without your "stride" being broken by waiting for a "compile", you know? So I'd love to know if there's a setting which prevents this initial delay. When I want to deploy, I can do a compile or something, but while making lots of small edits, I just need the page to run without that initial delay.
View 6 Replies
Sep 21, 2010
I've developed a web page Client.aspx that is used for editing a client. This application has been deployed and I made sure that debug='false'.Upon selecting a client from the dropdownlist, his/her information is retrieved for editing. This retrieving process is very slow( about 9 seconds).Except this DropDownList, all the other controls on this page are within the Update Panel. There are 2-3 other Update Panels within the main Update Panel.
When a client is selected from the DropDownList, the Client_ID (DataValueField) is used to retrive the informationSELECT * FROM CLIENTS WHERE Client_ID=1576
This method returns a dataset.In the calling method I'm assigning these values to the respective fields.Some JavaScript is used for validating Phone#.I also have a RadioButtonList on this page. When one of the ListItem is selected I need to disable a TextBox. Even this process is taking much time than expected.
View 4 Replies
Jan 20, 2010
Every now and then (always after a long period of idle-time, e.g. overnight) when I access a site built using asp.net - it takes around 15 seconds to load the page (15 seconds before I see any progress whatsoever, then the page comes up fast).Further pages on that site, or refreshes, are quick as usual - they are also fast on other machines, only the first one seems to take the 'hit'.
Page tracing never through anything up (whole cycle was a fraction of a second) So my question is where else should I be looking? Perhaps IIS? Or could it still be my asp.net app and I'm just looking in the wrong place (the trace) for clues?As I don't have much control over the IIS server, anything I can check through asp.net would be more helpful, before I go ask that particular admin.
View 7 Replies
Sep 3, 2010
The first time that my page loads (this is after it has been deployed), it is terribly slow.
My guess is that it is still compiling dynamically, and not precompiling.When I publish through VS2008 I have "Allow this precompiled site to be updatable" unchecked and "Use fixed naming and single page assemblies" checked.Could I be missing something in my web.config file?
I can post the URL of the site if you would like to view it, but it takes 10+ seconds to load upon first visiting, and then less than 1 second to navigate the site.
View 3 Replies
Mar 16, 2011
I've a page which consolidates different sections by different .aspx pages. Those pages will be loaded into corresponding div(s) dynamically by using jQuery.load(). They all are rendered properly, however, when clicking on any asp:button in any section page, the entire main page will be replaced by the section page even the asp:button is just popping up a message box.
View 2 Replies
Aug 9, 2010
Is there a way of filtering large CSS files for the only required selectors on a page, and creating css files that contain just these selectors?
Case: I have a very large CSS file that I want to filter on a per page basis, so that the file size is cut down and can be cached by mobile devices. I was thinking along the lines of something like a server side dust me selectors tool.The particular project I am working on is using ASP.NET MVC.
View 1 Replies
Feb 20, 2011
I have a MVC view using the following VM.
[Code]....
Currently the page load slow. I am thinking of using JQuery load and render List<A> and List<B> separately and asynchronously. Can I still use MVVM pattern? Or I had to create to controller methods returning List<A> and List<B> separately?]
View 2 Replies
Feb 5, 2011
My web site seems to be running quick. I have not deployed my web site yet, so I am the only one using it right now. The problem I have is if I am testing out the site and then I stop using it for a short period of time, when I come back the web site takes about 8-10 seconds to startup again. I did not rebuild the site I just simply stopped using it for a short period of time. It seems like after a short period of time I have to 'wake it up' again. Is this normal? How can I prevent this?
View 2 Replies
Feb 24, 2011
We recently migrated to v4 of .net. We are running iis 7 in integrated mode. When the site first starts its slow. I get that - it compiles for the first time. The odd thing is then we will go to certain pages and it seems to compile again. The next time i go that page its very fast. Nothing exceptional with the second page - but once that is hit the rest of the site is fast.
View 1 Replies
Dec 8, 2010
Over the last week I've been investigating an issue for one of our clients whereby the initial page load following a deployment of their website takes around 1 minute, resulting in unacceptable downtime for end users. This was happening not only for code deplyments (bin dll's and .config files) but also if there were large numbers of .aspx pages updated. For code deployments it's not an issue, but for aspx updates it is; in this particular scenario, we are making use of a 3rd party content management system (RedDot from OpenText) in which every page of the site is published out as a distinct .aspx page. This means that for this website there's somewhere in the region of 2,400 separate .aspx pages. I realise this isn't an ideal situation but we're working within the constraints of the CMS, and we managed to correlate the instances where the site was unresponsive with App pool restarts, which also corresponded to publications of of .aspx pages.
I found an article by Tess Ferandez [URL] which describes all the reasons why the app pool may restart, and it does seem that if more than 15 .aspx pages are changed then the app pool will recycle and the pages will be re-compiled. Another msdn article [URL] then gave me a few pointers on how to start addressing this problem, and for the moment I've set a flag on the compilation options to prevent batch compilation:
<compilation batch="false">
This means that the initial page load now takes around 6 seconds instead of 1 minute, which is a great improvement. However, I also used the "Compilations Total" performance counter to investigate the number of pages that have been compiled by ASP.NET for my site and was quite surprised that the total number of pages that get compiled peaks at 44, which is odd given that there are 2,400 aspx pages in the site. If the batch flag is set to false, the counter slowly increments by 1 page at a time as you click around on the site; if batch mode is true, the initial compilation takes the number straight to 44 over the course of ~60 seconds. What I'm really struggling to understand is why all 2,400 pages aren't compiled. Does anyone have any inside info on what might be going on as all the documentation I've read seems to indicate that all of the pages should be compiled and this counter should be much higher.
View 1 Replies
Dec 9, 2013
i want to check my fileuploas size . if bigger then 2mbm error message will popup, this is my some of my code
If file_newimage.HasFile = True Then
Dim ext As String
ext = System.IO.Path.GetExtension(file_newimage.FileName).ToString
If ext <> ".jpg" And ext <> ".png" And ext <> ".bmp" And ext <> ".jpeg" Then
MessageUser("Photo uploaded must be in .jpg/.png/.bmp/.gif or .jpeg format")
Else
If file_newimage.PostedFile.ContentLength > 2097000.0 Then
[Code]....
but when i input image 12MB, just to check my coding my page went "Page cant be displayed" ...
View 1 Replies
May 20, 2010
Server Error in '/MedTegraSL.Web' Application.
Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
Description:
An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
Source Error:
[Code]....
Source File:
c:ProductiveTeamsMedTegraPresentationMedTegraSLMedTegraSL.WebMainMaster.Master Line: 16 Assembly Load Trace: The following information can be to determine why the assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' could not be loaded.
[Code]....
Stack Trace:
[Code]....
View 2 Replies
Aug 6, 2010
I've noticed as my website gets bigger and bigger, the time my laptop takes to display my page is much longer then say a new projects with minimal references. I think there are two variables at play that affect ASP.NET warm-up time:
The quantity of external references The time it takes for a worker process to new() up each instance per worker process Additional time for the WCF objects as the ServiceHost may be in an external DLL First, are those the correct variables to take into account when considering ASP.NET startup time? Next, it appears that web.config may dispatch other objects for use with certain filetypes (*.svc, *.aspx, Windows Identity Foundation (WIF), etc. ). This too may cause delays in ASP.NET.
Last, my project is created as a "web project" not a "web site". Not sure if this has an impact. Is my theory full of holes, or is there something I can do to make development on a old laptop any better?
View 1 Replies
Dec 27, 2010
In my database when I fire query it takes 40 secs on 1 crore data, similar when I use join with other table then it take more time. I have taken care non cluster index such thing. But still I want to optimize my query, what other thing I need to take like buffer, disk size etc. I am not sure on this area.
View 11 Replies