Live code sync for a remote FTP site? - css

I develop on a remotely hosted site that I push files to via SFTP. I would like to set up my site so that I can see any CSS and HTML changes reflected immediately without the need to manually refresh my browser. I've looked at using mixture and browser sync for this but they appear to only work on locally hosted sites. Any suggestions on how to go about setting this up on remotely hosted project?

You might want to try "Emmet LiveStyle", this is a plugin for Chrome and for Sublime Text editor that lets you live code CSS (not HTML) and changes are reflected immediately without the need to refresh the browser.
Then you can use "Sublime SFTP" package for Sublime Text to automatically upload CSS files on save.
I use this setup and it works perfectly.

Related

How to code CSS changes locally for a hosted domain?

What tool/editor do you recommend to (live) test your local CSS changes against an externally hosted site?
A site lives on a domain.test (no server access), and I need to write extensive CSS overrides to reskin the entire site. All changes will be in a single CSS file with no preprocessor.
The ideal setup is using the comfort of my regular code editor (Visual Studio Code) and having the site open in a browser and have the CSS auto-refresh as I save my CSS changes in a local directory.
It's a big site, so I'm open to setting up a complex setup rather than relying on testing edits using browser inspect mode or mounting CSS files using Firefox.
:: I can inject JS script/library to the site if it helps with my setup.
Bonus: If I can do that for Vanilla JS too.
I would do it as follows with ModHeader and ScriptAutoRunner (chrome extensions).
With ModHeader replace the site's CSS and JS to local files using the "Redirect URL" function. (If necessary use ScriptAutoRunner to inject JS).
In one of these JS files create a rule to download every 2 seconds via ajax (any other way) your local files and check if there is equality with the last request or not. If the file has changed then reload the page (to update).
I know there are some tools that show CSS changes in real time without you having to reload, but I don't use them and the way I mentioned you can also make them run when the JS is updated.

How to host a "local" webpage without needing to make it a real webpage?

I've tried finding an answer on the web and google for this but it just tells me how to HOST a webpage and I don't want anyone else to get to this webpage. I want to be able to write my HTML and CSS and see it before having it put anywhere.
How do I go about doing that?
You do not need to "Host" a webpage to view it (unless you are using server side code).
Just save your file with the .html extension and then open it with your web browser.
You can use WAMP or XAMPP for running a local testing.
If you are using just HTML and CSS you don't have to host it. Just open the *.html file in the browser from your local storage with relative paths to your CSS/images.
If you want to use PHP for example (server side code) you can install XAMPP, a free and open source apache distribution as popular develop environment.

ckeditor not working after upload to server

I used ckeditor in mvc5 project.after I deployed to local machine it work fine in any browser.
But after I upload it to web server it is not working.
I can see the textarea without ckeditor tools.
Finally I figure it out.The problem is I place the link to ckeditor.js file in top of view page.After I move it to layout head section now its working fine. I think there is a conflict between if inline jquery run first.

Edits in .asp net website wont show

i've got an issue with website made in asp.net. A site is published and online, i've made some modifications, republished site on my computer and just uploaded a .aspx file into the server via ftp.
First time it seems to have worked after a while. But i've made a small error and want to edit it again, i did the same, but it wont change. Could it be that i need to wait some time before changes are seen? Or could it be that there needs to be a server restart or something?
If you've edited something in the aspx.cs page you will need to upload the bin directory to the remote site, or better still republish the whole site.
If it is a change to the .aspx, css or javasctipt file, the original will most likely be cached in your browser. Try a differrent browser brand or refreshing the page, ctrl-f5 does a complete refresh.
If this error was by any chance a CSS mistake, that can be easily fixed by adding a "?" at the end of the address since CSS files are normally stored in the cache of the browser and the ? tells the browser to update them. Same thing is true about JavaScripts which are kept in individual files
I'd recommend you to use the Visual Studio Publish Website under the Build instead of manually uploading the site over FTP. That built in publisher provides you many advantages of which one of them is the same issue you have faced. When you make a small change, fixing the error in host would be very faster by republishing the site that way rather than manually upping it over FTP.

How can I get chrome to stop caching when working on an aspx file in visual studio

I'm currently editing some html/css within a aspx file inside of Visual Studio 2010. I'm using Chrome as my browser. When I make changes inside of Visual Studio and save/ctrl + F5 to run it frequently fails to load the new updated .css file due to pulling old cached versions of the CSS.
I've used visual studio as my primary HTML editor before but when I work with pure html/css files I just save and refresh the file in chrome and it will refresh the updated css 100% of the time. I've only started to experience this problem when working with aspx files and running things via ctrl + f5. Anyone have any ideas of how I can fix this?
Go to project properties, Web tab
Choose Start External Program in the Start Action section
Paste or browse to the path for Google Chrome (Mine is C:\Users\Chris\AppData\Local\Google\Chrome\Application\chrome.exe)
In the Command line arguments box put -incognito
If you would like the browser to open a specific page, then you will need to set the Visual Studio Development Server to use a specific port (ie 4066) then change your command line arguments to include that address, for example: -incognito localhost:4066/Default.aspx
Incognito Mode should prevent caching between sessions and even tabs.

Resources